Skip to content

dk67604/DataStructureAndAlgorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

Data Structure And Algorithms

This repo focuses on common problems asked in multiple companies like Amazon,Facebook,Google,Microsoft.

CTCI Problems

Arrays and Strings

# Problem Description
1 Is all characters in Strings are unique View
2 Is pair of Strings are permutation of each other View
3 URLify space with special characters View

Data Structures

# Problem Description
1 Binary Indexed Tree View
2 Graph View
3 Max Heap View
4 Min Heap View
5 Max Stack View
6 Circular Queue View
7 HashMap View
8 Queue View
9 Stack View
10 Trie View

Top Coding Problems

Arrays and Strings

# Problem Description
1 Cyclic Sort View
2 Daily Temperatures View
3 Decode Ways View
4 Edit Distance View
5 Employee Free Time View
6 Find Closest Element View
7 Find Corrupt Number View
8 First and Last position of a element View
9 Frog Jumps View
10 Group Anagrams View
11 Interval Intersections View
12 Jump Game View
13 Jump Game II View
14 Jump Game III View
15 Kadanes Algorithm View
16 Largest Subarray with Zero Sum View
17 Letter Combination Phone Number View
18 Longest Repeating Character replacement View
19 Longest Substring with K Distinct Characters View
20 Longest Substring without repeating characters View
21 Find the maximum sum of any contiguous subarray of size ‘k’ View
22 Maximum length of concatenated string with uinque characters View
23 Merge Intervals View
24 Minimum deletion to make character frequencies unique View
25 Minimum meeting rooms View
26 Minimum number of platforms needed View
27 Minimum Time Difference View
28 Missing Number View
29 Missing Ranges View
30 One Edit Away View
31 Pair with Target Sum View
32 Partition Array into Disjoint Interval View
33 Permutation in String View
34 Remove All to avoid consecutive letters View
35 Set Matrix Zero View
36 Spiral Matrix View
37 Square Sorting Arrays View
38 Trapping Rain Water View
39 Triple Sum to Zero View
40 Two Sum in a sorted array View
41 Valid Palindrome View
42 Valid Parentheses View
43 Word Ladder View
44 Rotate Matrix View
45 Smallest Divisor View
46 Minimum Deletion Cost Required To Avoid Repeating Letters View
47 String Compression View
48 Robot Bounded In Circle View
49 Next Permutation View
50 First Missing Positive View
51 Is Subsequence View
52 Longest Common Prefix View
53 Longest Common Word View
54 Majority Element View
55 Word Distance View
56 Shuffle View
57 Missing Binary Number View
58 Best Time To Buy and Sell Stock View
59 Concatenated Word View

Linked Lists

# Problem Description
1 Clone a linked list with Random Pointer View
2 Insert to Circular Linked List View
3 Is Palindrome View
4 List merge View
5 Reverse Linked List View
6 Reverse Nodes in K groups View
7 Sum Lists View
8 Reverse Nodes in K groups View
9 Swap Node in Pairs View
10 Insert To Circular LinkedList View

Dynamic Programming

# Problem Description
1 Longest Common Subsequence View
2 Longest Increasing Sequence View
3 Longest Common Substring View
4 Maximum Subarray View
5 Palindromic Substring View
6 Target Sum View
7 Predict Winner View
8 Maximum Profit In Job Scheduling View
9 Partition Equal Subset Sum View
10 Count Of Palindromic Subsequences View
11 Minimum Difficulty of Job Schedule View
12 Robot In Grid View

Stacks

# Problem Description
1 Min Stack View
2 Minimum Remove to make valid parentheses View
3 Valid Parentheses View
4 Maximum Depth Of Valid Parentheses View

Trees and Graph

# Problem Description
1 All Nodes at distance K View
2 BST Iterator View
3 Boundary Traversal View
4 Count of Good Nodes View
5 Distance Between Two nodes View
6 Inorder predecessor successor of Binary Tree View
7 Inorder Successor of Binary Tree View
8 Invert Binary Tree View
9 Lowest Common Ancestor of Binary Tree View
10 Lowest Common Binary Search Tree View
11 Recover Binary Tree View
12 Validate BST View
13 Cycle in Directed Graph View
14 Cycle in Undirected Graph View
15 Number of Island View
16 Number of Distinct Island View
17 Surrounded Region View
18 Node At Distance K from Leaf View
19 Maximum Difference between Node and Ancestor View
20 Maximum Difference Between Node and Descendent View
21 Construct Binary Tree from Preorder and Inorder View
22 Construct Tree from PostOrder and Inorder View
23 Construct BST from Preorder View
24 Connected Sum View
25 Binary Tree With Maximum Path Sum View
26 Clone Binary Tree with Random Pointer View
27 Populate Next Pointer in each Node View
28 Populate Next Pointer in each Node II View
29 Right Side View of Tree View
30 Symmetric Tree View
31 Delete Node in BST View
32 Minimum Cost To Connect Cities View
33 Number Of Provinces View
32 All Path From Source To Destination View
33 Longest Zig-Zag Path In Binary Tree View
34 Minimum Cost To Connect Cities View
35 Pond Sizes View
36 Redundant Connection View
37 Shortest Path to Get Food View
38 Binary Tree To Doubly Linked List View
39 Path With Sum View
40 Shortest Bridge View
41 Topological Sort View
42 Diameter of Binary Tree View

Backtracking

# Problem Description
1 Word Search View
2 Word Search II View
3 Palindrome Partition View
4 Palindromic Permuation View
5 Sudoku Solver View
6 Evaluate Division View
7 Combination Sum View
8 Combination View
9 Palindromic Permutation View
10 Robot Room Cleaner View

Search and Sorting

# Problem Description
1 MergeKSortedList View
2 Find Duplicate View
3 Maximum Area of a Piece of Cake View
4 Merge Sort View
5 Quick Sort View
6 Remove Duplicates View
7 Reorder Log Files View
7 Kth Smallest Number View

Subsets

# Problem Description
1 Subsets View
2 Permutations View

Heaps

# Problem Description
1 Maximum Units on Truck View
2 Median Of Stream View
3 Sliding Window Median View

System Design

# Problem Description
1 Analyze User Website Visit Pattern View
2 LFU Cache View
3 LRU Cache View
4 Randomized Set View
5 Serialize Deserialize Binary Tree View
6 Serialize Deserialize N-Ary Tree View
7 String Iterator View
8 First Unique View
9 Multi Search View

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages