DSA

Problems

Arrays

  1. Subarray with given sum

  2. Count the triplets

  3. Kadane's Algorithm

  4. Missing number in array

  5. Merge Without Extra Space

  6. Rearrange Array Alternately Giving SEG FAULT

  7. Two Sum

  8. Fizz Buzz

  9. Maximum Gap

  10. Majority Element

  11. Majority Element II

  12. Merge Intervals

  13. Best Time to Buy and Sell Stock

  14. Best Time to Buy and Sell Stock II

  15. Maximum Subarray

  16. Maximum Product Subarray

  17. Two Sum II - Input array is sorted

  18. Range Sum Query - Immutable

  19. Product of Array Except Self

  20. Product of Array Except Self

  21. Missing Number

  22. Find Minimum in Rotated Sorted Array

  23. Max Sum Subarray of size K

  24. Merge Sorted Array

  25. Squares of a Sorted Array

  26. Rotate Array

  27. Move Zeroes

  28. Two Sum II - Input array is sorted

  29. Intersection of Two Arrays

  30. Intersection of Two Arrays II

  31. Reshape the Matrix

String

  1. Reverse words in a given string

  2. Permutations of a given string

  3. Remove Duplicates

  4. Reverse String

  5. Valid Palindrome

  6. Valid Anagram

  7. Reverse Words in a String III

Linked List

  1. Finding middle element in a linked list

  2. Reverse a linked list

  3. Rotate a Linked List

  4. Delete Node in a Linked List

  5. Convert Binary Number in a Linked List to Integer

  6. Add Two Numbers

  7. Remove Nth Node From End of List

  8. Middle of the Linked List

Stack

  1. Parenthesis Checker

  2. Evaluate Reverse Polish Notation

Queue

  1. Binary Search

  2. First Bad Version

Hash Table

  1. Single Number

  2. Contains Duplicate

  3. Distribute Candies

  4. Valid Sudoku

  5. Ransom Note

  6. First Unique Character in a String

Backtracking

  1. Permutations

  2. Subsets

  3. Subsets II

  4. Rat in a Maze

  5. N-Queens

  6. N-Queens II

  7. Combination Sum III

  8. Sudoku Solver

  9. Rat in a Maze Problem - I

  10. Count of Matches in Tournament

  11. Sum of All Subset XOR Totals

  12. Next Permutation

  13. Permutations II

  14. Combination Sum

  15. Letter Combinations of a Phone Number

  16. Reverse Nodes in k-Group

Bit Manipulation

  1. Maximum Product of Word Lengths

Binary Tree

  1. Binary Tree Inorder Traversal

  2. Binary Tree Preorder Traversal

  3. Binary Tree Postorder Traversal

  4. Same Tree

  5. Invert Binary Tree

  6. Count Complete Tree Nodes

  7. Maximum Depth of Binary Tree

  8. Minimum Depth of Binary Tree

  9. Binary Tree Level Order Traversal

  10. Transform to Sum Tree

  11. Diameter of Binary Tree

Dynamic Programming

  1. Min Cost Climbing Stairs

  2. Fibonacci Number

  3. 0 - 1 Knapsack Problem

  4. Subset Sum Problem

  5. Partition Equal Subset Sum

  6. Climbing Stairs

  7. Perfect Sum Problem

  8. Pascal's Triangle

Sliding Window

  1. Max Sum Subarray of size K

  2. First negative integer in every window of size k

Binary Search

  1. Binary Search

  2. First Bad Version

  3. Search Insert Position

  4. Search a 2D Matrix

Random

  1. Valid Anagram

  2. Reverse Integer

Problem References

Must Do Coding Questions for Companies like Amazon, Microsoft, Adobe, …

LeetCode

Daily Challenge

Study References

GFG - C++

Fork - CPP

Classes

Sum of Subarrays

Subsequences

Namespace std

Memory Leak

Extra info: A memory leak is bad because it blocks memory resources and degrades system performance over time.

Variable Length Arrays

BIT Manipulation in 11 minutes

C++ Full Course | C++ Tutorial | Data Structures & Algorithms

14 Patterns to Ace Any Coding Interview Question

Data Structures and Algorithms

Linked List Data Structure

Binary Tree Data Structure

Backtracking Algorithms

Recursion and Backtracking

STL

Permutations of a given string using STL