Skip to content

All the practice code from LeetCode, CodeChef, and HackerRank

License

Notifications You must be signed in to change notification settings

ssp4all/competitive-coding-algos

Repository files navigation

competitive-coding

Problems solved

12/22

  • Max area of an island
  • Single number 1 and 2

12/23

  • Remove duplicates from a LL
  • Search in BST
  • Tree-boundary-traversal
  • Subtree of another tree

12/24

  • Longest substring without repeating char
  • Search min in rotated and sorted array
  • Lowest Common Ancestor
  • Valid palindrome 1 and 2

12/25

  • Spiral matrix
  • Play with chips
  • Max depth of binary and n-ary tree

12/26

  • Group Anagrams
  • Coin change
  • All types of longest palindrome substring
  • Total no of palindrome strings
  • Same tree
  • Tic-Tac-Toe

12/27

  • Move zeroes
  • invert Btree
  • Find common characters
  • Video Stiching
  • Merge tree
  • Minesweeper (not solved)

12/28

  • Binary-tree-level-order-traversal
  • GCD and LCM
  • Factors of a number
    • Greatest-common-divisor-of-strings
  • Max subarray sum (using divide and conquer pending)
    • House Robber

12/29

  • Intersection-of-two-linked-lists
  • Topological sort
    • Path sum-3
  • Min stack

12/30

  • Permutation check for palindrom for string
  • Word pattern
  • Boundary traversal

12/31

  • Validate-binary-search-tree
  • Sliding window maximum
    • Top-k-frequent-words
  • Favorite Genre
  • Word ladder
  • custom-sort-string and custom-sort-array

"Happy New Year, keep scrolling ;)"

01/01

  • Roman to int
  • Top k freq elements
  • Subtree of another tree
  • Sum of two int
  • Video buffer

02/01

  • Find the celebrity
  • 3sum
  • Max product of word length
  • Hamming dist
  • Form a no (DP) **

03/01

  • Cycle in LL
  • Max len of pair chain
  • Dec to bin and vice-versa
  • Happy Number
  • LL cycle 2
  • Intersection-of-two-arrays-ii
  • intersection-of-three-sorted-arrays
  • Contains duplicates

04/01

  • Largest No
    • Word break
  • Lowest-common-ancestor-of-a-binary-search-tree
  • Binary-tree-right-side-view

05/01

  • Remove element (in-place) from array and LL
  • Remove-duplicates-from-sorted-array
  • Valid mountain array
  • Task schedular
  • Pattern Matching **

08/01

  • kth-smallest-element-in-a-sorted-matrix (revise)
  • Surrounded region
  • Merge k-sorted LL
  • find-all-numbers-disappeared-in-an-array

09/01

  • shortest-unsorted-continuous-subarray
  • Rotate List

10/01

  • Flood Fill
  • Island perimeter
  • convert-sorted-array-to-binary-search-tree

11/01

  • shortest subarray with sum atleast k ** (only +ve's)
  • Maximum or count numbers of subarray-sum-equals-k

12/01

  • Pivot index
  • Subarray prod less than K (+ve's)
  • Maximum-product-subarray

13/01 and 14/01

  • Battleship on a board
  • merge-sorted-array

15/01

  • Two Sum-4

16/01

  • letter-combinations-of-a-phone-number

17/01

  • Distinct islands
  • Walls and gates
  • Container with most water

18/01

  • string-compression
  • Count and say
  • koko-eating-bananas

19/01

  • Decode ways
  • Min spanning cities (prim's algo)

20/01

  • LRU design
  • set matrix zeroes
  • Cont subarray sum (revise)
  • count-sub-arrays-sum-divisible-k (Not done)

21/01

  • Grumpy shopkeeper
  • Hopping frog

22/01

  • Trie

23/01

  • Generate paranthesis
  • Get all subdirectories and files-recursively
  • longest-increasing-subsequence

24/01

  • Max consecutive ones

25/01

  • Numbers of longest increasing seq (DP)
  • median-of-two-sorted-arrays

26/01 (Happy Republic Day)

  • String to int
  • integer-to-english-words
  • Gave Blackrock

27/01

  • Game of life
  • Pacific and atlantic water flow

28/01

  • Sieve of Eratosthenes (prime no < n)

29/01

  • Implemented heappop and heappush ops
  • Nth fibonacci number, index of nth fibo, golden ration

30/01

  • Meeting rooms using heap
  • Btree populate
  • Paint houses
  • Permutations-1, permutation-2
  • Count one bits (DP)

31/01

  • Next permutation
  • Combination
  • Sets

01/02

  • Find duplicates in a tree
  • Repeated string match
  • Search suggestion system

02/02

  • BST insertion and deletion
  • Merge and delete intervals

03/02

  • Sudoku validate and solver

06/02

  • Tree traversal iteratively (pre, in, and post)
  • Peeking iterator

07/02

  • Min path sum
  • Sparse mat multiplication
  • Jump game

09/02

  • Broken cal
  • Remove digits

10/02

  • Find a element in row sorted matrix or column sorted

11/02

About

All the practice code from LeetCode, CodeChef, and HackerRank

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published