LeetCode Solutions

View on GitHub

LeetCode Solution



Cousins in Binary Tree.cpp

Squares of a Sorted Array.cpp

Sort Colors.cpp

satifying equation.cpp




Min Cost Climbing Stairs.cpp

Letter Combinations of a Phone Number.cpp

Top K Frequent Words.cpp

Maximum Size Subarray (Contiguous) Sum That Equals k.cpp

Maximum Average Subarray I.cpp

Task Scheduler.cpp

Count Number of Teams.cpp

Delete Leaves With a Given Value.cpp

Binary Tree Right Side View.cpp

Container With Most Water.cpp

Find K Pairs with Smallest Sums.cpp

preorder class.cpp

Combination Sum II.cpp

Maximum Depth of Binary Tree.cpp

Traversal class.cpp


Increasing Triplet Subsequence.cpp

Minimum Absolute Difference in BST.cpp

Counting Bits (Medium ).cpp

Symmetric Tree.cpp

Increasing Triplet Subsequence.cpp

Search in a Binary Search Tree.cpp

Solve the Equation.cpp

Two Sum to target.cpp

Counting Elements leetcode good question.cpp

Climbing Stairs.cpp

Subarray Sums Divisible by K.cpp

Copy List with Random Pointer Medium.cpp

Top K Frequent Elements.cpp

Reverse Words in a String.cpp

Same Tree.cpp

Search a 2D Matrix II.cpp

class Solution {

similar dissimilar.cpp

Subarray Sum Equals K.cpp

Search in Rotated Sorted Array II.cpp

sort colors dutch flag method.cpp

K Closest Points to Origin.cpp

Minimum Size Subarray Sum equals s.cpp

Binary Tree Zigzag Level Order Traversal.cpp

Find Peak Element.cpp

Add Two Numbers II.cpp

Populating Next Right Pointers in Each Node II.cpp

Power of Four.cpp

Remove Nth Node From End of List. Pointer Approach.cpp

Binary Tree Level Order Traversal.cpp

Subsets II.cpp


Reformat The String.cpp

Smallest String Starting From Leaf.cpp

Good sort color function.cpp

Maximum Product Subarray.cpp

Kth Smallest Element in a Sorted Matrix.cpp

coin change recursive.cpp

K-diff Pairs in an Array.cpp


Group Anagrams Solution.cpp

Rotate Image.cpp

find all occurence of cl hackerrank.cpp

Binary Tree Paths.cpp

Merge Sorted Array.cpp

Intersection of Two Arrays II.cpp

Contiguous Array (count max len equal no 0s N 1s).cpp

Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold.cpp

player and score.cpp

Search a 2D Matrix.cpp

Display Table of Food Orders in a Restaurant.cpp

Longest Substring Without Repeating Characters.cpp

Path Sum III.cpp

cake winner.cpp

intial name or full name.cpp

Basic Calculator II.cpp

Continuous Subarray Sum.cpp

Most Frequent Subtree Sum.cpp

Insert into a Binary Search Tree.cpp

Rotate List.cpp

Perform String Shifts.cpp

Sort Array By Parity II.cpp

Happy Number.cpp


Subarray Product Less Than K.cpp

coin change Dynamic Programming.cpp

Search a 2D Matrix II copied.cpp

Backspace String Compare.cpp

Remove Linked List Elements Easy.cpp

Kth Largest Element in a Stream.cpp

Hard Basic Calculator.cpp

Binary Search Tree Level Order .cpp

Number of 1 Bits.cpp

Permutations II.cpp

Path Sum.cpp

Jump Game.cpp

Largest Number.cpp

Rotate Array.cpp

Middle of the Linked List.cpp

Maximum Swap.cpp

Find All Anagrams in a String.cpp

Power of Two.cpp

Majority Element II.cpp

Perfect Squares.cpp

validate bst.cpp

Linked List Cycle II.cpp

N-th Tribonacci Number.cpp

Binary Tree Level Order Traversal II.cpp

Evaluate Reverse Polish Notation.cpp

Fraction Addition and Subtraction.cpp

Find Bottom Left Tree Value.cpp

Combination Sum.cpp

Minimum Depth of Binary Tree.cpp

Long Pressed Name.cpp

Sort Characters By Frequency.cpp

Populating Next Right Pointers in Each Node.cpp

Set Matrix Zeroes.cpp

Continuous Subarray Sum(multiple of K).cpp

Minimum DIfference Racer.cpp

Maximum Average Subarray I.cpp


Remove Nth Node From End of List.cpp

Sum Root to Leaf Numbers.cpp

Minimum Distance Between BST Nodes.cpp

challenge ahcker rank.cpp

Valid Parentheses.cpp

Next Permutation.cpp

Average of Levels in Binary Tree.cpp

Letter Case Permutation.cpp

Majority Element.cpp

Group Shifted Strings.cpp

Optimized Permutations II.cpp

Power of Three.cpp

hacker rank code in lock down score count.cpp

Longest Subarray having sum K.cpp

sieve of Erathones.cpp

Minimum Size Subarray Sum.cpp

Kth Smallest Element in a BST.cpp

Longest Substring with At Most K Distinct Characters.cpp

Queries on a Permutation With Key.cpp

Samosa Hacker Rank .cpp

Move Zeroes.cpp

Reorganize String.cpp

Combination Sum III.cpp

Shuffle an Array.cpp

Maximum Sum Subarray.cpp

Permutation in String.cpp

prefix substring Hacker rank.cpp

Minimum Value to Get Positive Step by Step Sum.cpp

Binary Tree Tilt.cpp

Combination Sum IV.cpp

Check If Word Is Valid After Substitutions.cpp

Product of the Last K Numbers.cpp

Intersection of Two Arrays.cpp

Path Sum II.cpp

With ❤️ From BabaYaga