Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Snippets4cpNew to Visual Studio Code? Get it now.
Snippets4cp

Snippets4cp

MNNITians

|
282 installs
| (2) | Free
C++ Snippets
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Snippets4cp

Code snippets are great additions to anyone who wants to save time while Coding. They make it easier to write Algorithms,repeating code, such as loops, or reusable methods in competitive programming competitions.

How to use

Type the below Prefixes to get your required Code Snippet. ezgif com-gif-maker1

Install instructions

Install via Extension Marketplace

-> https://marketplace.visualstudio.com/items?itemName=MNNITians.snippets4cp

For Rating and Review

->https://marketplace.visualstudio.com/items?itemName=MNNITians.snippets4cp&ssr=false#review-details

Features

Code snippets for the following triggers:

Prefix Snippet Description Language
template generated sample template c++/cpp
powerof2 Check if a number if power of 2 or not c++/cpp
bfs bfs traversal of graph c++/cpp
dfs dfs traversal of graph c++/cpp
detectCycleinUndirected Detect Cycle in Undirected graph c++/cpp
detectCycleinDirected Detect Cycle in Directed graph c++/cpp
kruskal kruskal minimum spanning tree c++/cpp
prims prims minimum spanning tree c++/cpp
dijkstra finding the shortest path c++/cpp
bellmann ford bellmann ford algo to detect negative edge wt. cycle c++/cpp
kosaraju find the number of stronglyconnected components c++/cpp
tarjan to find the number of connected components c++/cpp
articulation_point to find the vertex which after removal makes the graph disconnected c++/cpp
bridge to find an edge which after removal makes the graph disconnected c++/cpp
template template for linked list c++/cpp
addAtEnd add at end of linked list c++/cpp
addAtFront add at front of linked list c++/cpp
addAtPos add at specific position of linked list c++/cpp
deleteAtKey delete the linked list of given value c++/cpp
deleteAtPos delete at specific position of linked list c++/cpp
length length of linked list c++/cpp
search search a particular element in a linked list c++/cpp
print print linked List c++/cpp
nthfromStart to print the Nth node from the start c++/cpp
nthfromEnd to print the Nth node from the end c++/cpp
bubbleSort Sort array using bubble sort c++/cpp
selectionSort Sort array using selection sort c++/cpp
insertionSort Sort array using Insertion sort c++/cpp
mergeSort Sort array using Merge sort c++/cpp
quickSort Sort array using Quick sort c++/cpp
heapSort Sort array using Heap sort c++/cpp
countSort Sort array using Count sort c++/cpp
radixSort Sort array using Radix sort c++/cpp
bucketSort Sort array using bucket sort c++/cpp
inorderTraversal Inorder Traversal of tree c++/cpp
preorderTraversal Preorder Traversal of tree c++/cpp
postorderTraversal Postorder Traversal of tree c++/cpp
levelorderTraversal levelorder Traversal of tree c++/cpp
morrisTraversal morris Traversal of tree c++/cpp
diagonalTraversal diagonal Traversal of tree c++/cpp
verticalWidth Vertical Width of tree c++/cpp
diameterOfTree Diameter Of Tree c++/cpp
LCA lowest common ancestor c++/cpp
topView top view of binary tree c++/cpp
rightView right view of binary tree c++/cpp

Release Notes

All notable changes to the "Snippets4cp" extension will be documented in here and in the details found in the changelog file.

Future Updates

Complete Mathematics,Trie data structure and Segment Trees.

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft