Skip to content

abhishek0777/CP-Snippets-Extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 

Repository files navigation

VS Code CPP,C++,C Competitive Coding Snippets

This extension provide you C and C++ Competitive Coding snippets used frequently to ease and speed up your skills with VS Code

Installation

Visual Studio Marketplace

Launch Quick Open:

Paste the following command and press Enter:

ext install slayersumit.ccsnippets

MarketPlace

Here is direct link to marketplace CCSnippets


Supported languages (file extensions)

  • C++ (.cpp, .c++)
  • C (.c)

Snippets info

Every space inside { } and ( ) means that this is pushed into next line :) $ represent each step after tab.


Template

Prefix Method
cptemplate-> CP template

Mathematics

Prefix Method
isPowerOfTwo-> Check number is power of two
isPrime-> Check number is prime
primeFactors-> return all prime factors
countDivisors-> count of all divisors
divisorFunction-> sum of all divisors
nFactorial-> return n!
nFactorialMOD-> return n!%mod
nextPowerOfTwo-> next power of two
prevPowerOfTwo-> prev power of two
xpowery-> x^y
xpoweryMOD-> (x^y)%mod
sieve-> sieve of eratosthenes
combinatorics-> Combinatorics
topologicalSort-> topological sort

Graph

Prefix Method
cycleInUnDirectedGraph-> Check cycle in undirected Graph
cycleInDirectedGraph-> Check cycle in directed Graph
dijkstra-> Dijkstra shortest path algorithm
bellmanFord-> Bellman Ford shortest path algorithm
detectNegativeCycle-> Detect negative cycle
bridge_cutvertices-> bridges & cut vertices

DSA

Prefix Method
DSU-> Disjoint union data structures
inversions-> inversions

Segment Tree

Prefix Method
lazy_segtree-> lazy_segment tree
segtree-> segment tree

Dynamic Programming

Prefix Method
01knapsack-> 0-1 Knapsack
lis-> Longest increasing subsequence
subsetSum-> subset sum possible

String

Prefix Method
palindrome-> palindrome-String
pangram-> pangram-string
anagram-> anagram-strings
strtodec-> string->decimal
dectostr-> decimal->string
kmp-> occurences of pattern in a string
distict_characters-> count of unique characters in a string
lc_subsequence-> longest common subsequence of two strings
lc_substring-> longest common substring of two strings

Known Issues

No Issues till now

Release Notes

New Version with many more codes to help

1.2.0

Adding many more snippets to extension

Enjoy!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages