0% found this document useful (0 votes)
8 views3 pages

IMPORTANT TECHNICAL QUESTIONS 2025 - TOPIC WISE

The document outlines various data structures and algorithms, categorized into sections such as Arrays and Strings, Linked Lists, Stacks and Queues, Trees and Graphs, Sorting and Searching, Dynamic Programming, and Backtracking. Each section includes specific problems to solve, along with hints and strategies for implementation. It serves as a comprehensive guide for understanding and applying fundamental concepts in computer science.
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)
8 views3 pages

IMPORTANT TECHNICAL QUESTIONS 2025 - TOPIC WISE

The document outlines various data structures and algorithms, categorized into sections such as Arrays and Strings, Linked Lists, Stacks and Queues, Trees and Graphs, Sorting and Searching, Dynamic Programming, and Backtracking. Each section includes specific problems to solve, along with hints and strategies for implementation. It serves as a comprehensive guide for understanding and applying fundamental concepts in computer science.
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/ 3

Data Structures and Algorithms

DATA STRUCTURES

Arrays and Strings

1. Find the kth largest element in an unsorted array.


2. Reverse a String.
3. Determine if a string has all unique characters
4. Find the maximum product of two integers in an array.
5. Rotate an array to the right by k steps.
6. Check if two strings are anagrams of each other.
7. Given an array of integers, find the maximum sum of a contiguous subarray (Kadane's Algorithm).
8. Find the common elements between two arrays.
9. Implement a function to determine if a string is a valid palindrome considering only alphanumeric
characters and ignoring cases."
10. Given an array of integers, find two numbers such that they add up to a specific target number.

Hint1: Use a hash table to keep track of the numbers you've seen so far and check if the complement
exists.

or

Hint2: Use a hash map to store the numbers and their indices. For each number in the array, check if the
complement (target - number) exists in the hash map.

Linked Lists

1. Detect a cycle in a linked list.


2. Reverse a linked list.
3. Merge two sorted linked lists into one sorted linked list.
4. Detect and remove a cycle in a linked list.
5. Find the intersection point of two linked lists.
6. Reverse a linked list iteratively and recursively.
7. Reverse a linked list in groups of k nodes.
8. Merge k sorted linked lists into a single sorted linked list.
Hint: Use priority queues (heaps) or divide-and-conquer approaches.
9. Write a function to remove the nth node from the end of a linked list.
Hint: Use two pointers; advance one pointer n steps ahead, then move both pointers until the first one
reaches the end.

Java Full Stack - Advanced Topics


TechLearn Solutions
10. Find the missing number in a given integer array containing n distinct numbers taken from 0, 1, 2, ..., n.
11. Reverse a string without using extra space.
12. Find the longest substring without repeating characters.
13. Detect a cycle in a linked list and find the starting node of the cycle.
14. Merge two sorted linked lists into one sorted linked list.
15. Find the middle element of a linked list in one pass.

Stacks and Queues

1. Implement a stack using two queues.


2. Design a queue with two stacks.
3. Evaluate an expression given in postfix notation.
4. Check for balanced parentheses in an expression.
5. Design a queue that supports the operations enqueue, dequeue, and get_max in O(1) time.
6. Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.

Trees and Graphs

1. Find the lowest common ancestor in a binary tree.


2. Determine if a graph is connected.
3. Find the shortest path in a weighted graph (Dijkstra's algorithm).
4. Given a binary tree, implement a function to check if it is a valid binary search tree.
Hint: Perform an in-order traversal and ensure the values are in ascending order.
5. Find the height of a binary tree.
6. Check if a binary tree is balanced.
7. Perform level-order traversal of a binary tree.
8. Implement depth-first search (DFS) and breadth-first search (BFS).
9. Find the shortest path in an unweighted graph using BFS.
10. Implement a function to check if a binary tree is a binary search tree (BST).
Hint: Use an in-order traversal to ensure that the values are in ascending order.

Sorting and Searching

1. Implement binary search.


2. Sort an array using quicksort.
3. Find the median of two sorted arrays.
4. Implement quicksort and mergesort.

Java Full Stack - Advanced Topics


TechLearn Solutions
5. Search for an element in a rotated sorted array.
6. Implement merge sort.
Hint: Use a divide-and-conquer approach to split the array, sort each half, and then merge the sorted
halves.

PROBLEM-SOLVING AND CODING

Dynamic Programming

1. Solve the coin change problem where you need to find the minimum number of coins needed to make up
a given amount.
2. Hint: Use a bottom-up dynamic programming approach where you build up a solution using previously
computed results.
3. Implement the longest common subsequence algorithm.
4. Solve the Fibonacci sequence using dynamic programming.
5. Solve the 0/1 knapsack problem.
6. Calculate the minimum cost path in a grid with dynamic programming
7. Write a function to find the longest substring with at most two distinct characters.
8. Use: sliding window problem
9. Implement a function to find the maximum sum of a non-adjacent subsequence in an array.
10. Hint: Use dynamic programming to keep track of the maximum sum including or excluding the current
element.
11. Find the minimum number of platforms required for a train station.
12. Solve the activity selection problem.
13. Find the minimum number of coins required for a given amount.
14. Solve the interval scheduling maximization problem.

Backtracking

1. Solve the N-Queens problem.


2. Generate all possible subsets of a set.
3. Solve the Sudoku puzzle.
4. Generate all possible permutations of a given string.

Java Full Stack - Advanced Topics


TechLearn Solutions

You might also like