Accelerate problem-solving skill with custom pattern-wise snippets in VSCode.

Shortcut Commands

1. Searching Algorithm

Algorithm

Commands

Linear Search

!ls

Sentinel Linear Search

!sls

Binary Search

!bs

Meta Binary Search

!mbs

Ternary Search

!ts

Jump Search

!js

Interpolation Search

!is

Exponential Search

!es

Fibonacci Search

!fs

2. Sorting Algorithm

Algorithm

Commands

Bubble Sort

!bsort

Insertion Sort

!isort

Merge Sort

!msort

Quick Sort

!qsort

Selection Sort

!ssort

Heap Sort

!hsort

3. Stack

Algorithm

Commands

Implementation of stack

!istack

Monotonic stack

!mstack

Valid Parentheses

!vstack

Next Greater Element

!nstack

Reverse String

!strstack

Delete at middle element

!dstack

Largest rectangle in histogram

!lstack

4. Queue

Algorithm

Commands

Queue Implementation

!iqueue

Queue Reversal

!rqueue

Reverse First K elements

!kqueue

5. Linked List

Singly Linked List

Algorithm

Commands

Display

!dlist

Insertion at first

!firstlist

Insertion at end

!endlist

Insertion at position/Middle

!poslist

Delete at First

!dlist

Delete At End

!dendlist

Delete At AnyPosition

!danylist

Delete at anyValue

!dvaluelist

Note :

I chose not to include insertion or deletion operations for doubly and circular linked lists because these topics don't seem to be as frequently covered. Instead, I've provided code examples for a singly linked list, which is a more commonly discussed data structure.

Most Common Problem on linked list

Algorithm

Commands

Get length

!len

Middle Of Linked List

!mlist

Reverse a linked list

!rlist

Add Two Linked List

!addlist

Remove Duplicate Form Sorted Linked List

!unlist

Merge Two Sorted Linked List

!mlist

6. String

Algorithm

Commands

Valid Palindrome

!vstr

Generate Parentheses

!gstr

Number of Wonderful Substrings

!nstr

Isomorphic Strings

!istr

Sort Characters By Frequency

!sstr

7. Tree

Algorithm

Commands

Preorder Traversal

!ptree

Inorder Traversal

!itree

Postorder Traversal

!posttree

Level Order Traversal

!ltree

Height Of Binary Tree

!htree

Check for Balanced Tree

!ctree

Kth Smallest Element

!ktree

Max Value in BST

!mtree

Search In BST

!stree

8. Graph

Algorithm

Commands

BFS

!bgraph

DFS

!dgraph

Union Find Rank PathCompression

!ugraph

9. Dyanmic Programming ( DP )

Algorithm

Commands

01 Knapsack

!kdp

Unbounded KnapSack

!udp

Longest Common Substring

!lcsdp

Note:

We can enhance our collection of dynamic programming algorithm snippets at a later stage.

Problem if DSA Helper is not Exist :

In the absence of code snippets, developers may resort to copying commonly used code from GitHub repositories. However, this process not only consumes valuable time but also hampers problem-solving speed, particularly during high-pressure events such as hackathons or competitive programming competitions (CP).

Usage / Solution :

The DSA Helper code snippet extension resolves the inconvenience of time-consuming code searches on GitHub.
This enhances problem-solving speed, crucial for high-pressure scenarios like hackathons or competitive programming competitions.