50 Basic DSA Code Questions
1. Find the largest and smallest element in an array.
2. Reverse an array.
3. Check if an array is a palindrome.
4. Find the missing number in an array from 1 to n.
5. Remove duplicates from a sorted array.
6. Left rotate an array by one position.
7. Sort an array using Bubble Sort.
8. Sort an array using Selection Sort.
9. Sort an array using Insertion Sort.
10. Merge two sorted arrays.
11. Check if a string is a palindrome.
12. Count vowels, consonants, digits, and spaces in a string.
13. Reverse a string without using library functions.
14. Check if two strings are anagrams.
15. Remove all vowels from a string.
16. Convert lowercase to uppercase in a string.
17. Find the frequency of characters in a string.
18. Replace a substring in a string.
19. Compare two strings without using strcmp().
20. Find the longest word in a string.
21. Create a singly linked list.
22. Insert a node at the beginning, end, and a given position.
23. Delete a node by value.
24. Reverse a linked list.
25. Find the middle of a linked list.
26. Detect a loop in a linked list.
27. Merge two sorted linked lists.
28. Find nth node from end in a linked list.
29. Check if a linked list is a palindrome.
30. Remove duplicates from a linked list.
31. Implement a stack using array.
32. Implement a queue using array.
33. Implement a circular queue.
34. Check for balanced parentheses using stack.
35. Evaluate postfix expression using stack.
36. Implement a stack using linked list.
37. Implement a queue using linked list.
38. Implement two stacks in one array.
39. Implement a priority queue.
40. Convert infix to postfix expression.
41. Find factorial using recursion.
42. Generate Fibonacci series using recursion.
43. Calculate power using recursion (a^b).
44. Find GCD of two numbers using recursion.
45. Solve Tower of Hanoi problem.
46. Add two matrices.
47. Transpose of a matrix.
48. Multiply two matrices.
49. Search an element in a matrix.
50. Print matrix in spiral form.