Common Data Structures and Algorithms (DSA) Interview questions ๐๐
1. Array Manipulation:
- Implement a function to find the maximum subarray sum within a given array.
- Write code to rotate an array to the right by k steps.
2. String Manipulation:
- Given two strings, determine if one is a permutation of the other.
- Implement a function to reverse a string in-place.
3. Linked Lists:
- Write code to reverse a linked list.
- Implement a function to detect if a linked list has a cycle.
4. Sorting and Searching:
- Implement the quicksort algorithm in Python.
- Write code to perform binary search on a sorted array.
5. Trees and Graphs:
- Implement a depth-first search (DFS) algorithm for a binary tree.
- Write code to find the shortest path between two nodes in a graph using breadth-first search (BFS).
6. Dynamic Programming:
- Solve the classic "Fibonacci sequence" problem using dynamic programming.
- Implement the "coin change" problem to find the minimum number of coins required to make a given amount of change.
7. Miscellaneous:
- Implement a stack using arrays or linked lists.
- Write code to check if a given number is prime.
You can check these amazing resources for DSA Preparation
Credits: https://t.me/free4unow_backup
All the best ๐๐
Post #956
10.1K
- ๐ 14
- โค 2