Practice questions on DSA (1-09-23)

  1. Array:
  • Find the maximum and minimum elements in an array.
  • Rotate an array to the right by a given number of steps.
  • Merge two sorted arrays into a single sorted array.
  1. Linked List:
  • Reverse a linked list.
  • Detect if a linked list has a cycle.
  • Find the intersection point of two linked lists.
  1. Stack:
  • Implement a stack using an array and perform push, pop, and peek operations.
  • Check if a given expression containing parentheses is balanced.
  • Evaluate a postfix expression using a stack.
  1. Queue:
  • Implement a queue using an array and perform enqueue and dequeue operations.
  • Implement a circular queue.
  • Print the binary tree level by level using a queue.