[go: up one dir, main page]

0% found this document useful (0 votes)
117 views7 pages

100 - DSA Interview Questions

Uploaded by

sharma.shiv8535
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
117 views7 pages

100 - DSA Interview Questions

Uploaded by

sharma.shiv8535
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Array

1. Check if pair with the given Sum exists in Array

2. Best Time to Buy and Sell Stock

3. Find duplicates

4. Product of Array Except Self

5. Maximum Subarray

6. Maximum Product Subarray

7. Find Minimum in Rotated Sorted Array

8. Search in Rotated Sorted Array

9. 3 Sum

10.Container With Most Water

11.Find the Factorial of a large number

12.Trapping Rain Water

13.Chocolate Distribution Problem

14.Insert Interval

15.Merge Intervals

16.Non-overlapping Intervals

Matrix
1. Set Matrix Zeroes

2. Spiral Matrix

3. Program to find the transpose of a matrix

4. Word Search

String

1. Longest Substring Without Repeating Characters

2. Longest Repeating Character Replacement

3. Smallest window in a String containing all characters of other

String

4. Check whether two Strings are anagram of each other

5. print all anagrams together

6. Check if given Parentheses expression is balanced or not

7. Sentence Palindrome

8. Longest Palindromic Substring

9. Palindromic Substrings

10.Longest Common Prefix


Linked List

1. Reverse a Linked List

2. Detect Cycle in a Linked List

3. Merge Two Sorted Lists

4. Merge K Sorted Lists

5. Remove Nth Node From End Of List

6. Reorder List

7. Add 1 to a number represented as linked list

8. Find the middle of a given linked list

9. Delete last occurrence of an item from linked list

Stack & Queue

1. Convert Infix expression to Postfix expression

2. Next Greater Element

3. Delete middle element of a stack

4. Check mirror in n-ary tree

5. The Celebrity Problem

6. Length of the longest valid substring


7. Print Right View of a Binary Tree

8. Find the first circular tour that visits all petrol pumps

Tree

1. Maximum Depth of Binary Tree

2. Check if two trees have same structure

3. Invert/Flip Binary Tree

4. Binary Tree Maximum Path Sum

5. Binary Tree Level Order Traversal

6. Serialize and Deserialize Binary Tree

7. Subtree of Another Tree

8. Construct Binary Tree from Preorder and Inorder Traversal

9. Validate Binary Search Tree

10.Kth Smallest Element in a BST

11.Lowest Common Ancestor of BST

12.Implement Trie (Prefix Tree)

13.Add and Search Word


Heap

1. Top K Frequent Elements

2. Find Median from Data Stream

3. Largest triplet product in a stream

4. Connect n ropes with minimum cost

Graph

1. Clone Graph

2. Course Schedule

3. Pacific Atlantic Water Flow

4. Number of Islands

5. Longest Consecutive Sequence

6. Snake and Ladder Problem

7. Detect Cycle in a Directed Graph

8. Bridges in a graph

9. Check whether a given graph is Bipartite or not

10.Find size of the largest region in Boolean Matrix

11.Flood fill Algorithm


12.Strongly Connected Components

13.Topological Sorting

Dynamic Programming

1. Count ways to reach the n’th stair

2. Coin Change

3. 0/1 Knapsack Problem

4. Longest Increasing Subsequence

5. Longest Common Subsequence

6. Word Break Problem

7. Dice Throw

8. Egg Dropping Puzzle

9. Matrix Chain Multiplication

10.Combination Sum

11.Subset Sum Problem

12.Find maximum possible stolen value from houses

13.Count Possible Decodings of a given Digit Sequence

14.Unique paths in a Grid with Obstacles

15.Jump Game

16.Cutting a Rod

17.Maximum Product Cutting


18.Count number of ways to cover a distance

Bit Manipulations

1. Number of 1 Bits

2. Counting Bits

3. Missing Number

4. Reverse Bits

5. Find XOR of all subsets of a set

You might also like