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

Assignment For MTE

The document outlines an assignment for an Advanced Algorithmic Problem Solving course, detailing various algorithmic problems to solve, including concepts like prefix sum arrays, equilibrium index, and sliding window techniques. Each problem requires an algorithm, program, and analysis of time and space complexities, along with suitable examples for explanation. The assignment covers a wide range of topics, including data structures, dynamic programming, and bit manipulation.

Uploaded by

Krish Pandey
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)
11 views3 pages

Assignment For MTE

The document outlines an assignment for an Advanced Algorithmic Problem Solving course, detailing various algorithmic problems to solve, including concepts like prefix sum arrays, equilibrium index, and sliding window techniques. Each problem requires an algorithm, program, and analysis of time and space complexities, along with suitable examples for explanation. The assignment covers a wide range of topics, including data structures, dynamic programming, and bit manipulation.

Uploaded by

Krish Pandey
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

Advanced Algorithmic Problem Solving (R1UC601B)

Assignment for MTE

1. Explain the concept of a prefix sum array and its applications.


2. Write a program to find the sum of elements in a given range [L, R] using a prefix sum
array. Write its algorithm, program. Find its time and space complexities. Explain with
suitable example.
3. Solve the problem of finding the equilibrium index in an array. Write its algorithm,
program. Find its time and space complexities. Explain with suitable example.
4. Check if an array can be split into two parts such that the sum of the prefix equals the
sum of the suffix. Write its algorithm, program. Find its time and space complexities.
Explain with suitable example.
5. Find the maximum sum of any subarray of size K in a given array. Write its algorithm,
program. Find its time and space complexities. Explain with suitable example.
6. Find the length of the longest substring without repeating characters. Write its
algorithm, program. Find its time and space complexities. Explain with suitable
example.
7. Explain the sliding window technique and its use in string problems.
8. Find the longest palindromic substring in a given string. Write its algorithm, program.
Find its time and space complexities. Explain with suitable example.
9. Find the longest common prefix among a list of strings. Write its algorithm, program.
Find its time and space complexities. Explain with suitable example.
10. Generate all permutations of a given string. Write its algorithm, program. Find its time
and space complexities. Explain with suitable example.
11. Find two numbers in a sorted array that add up to a target. Write its algorithm, program.
Find its time and space complexities. Explain with suitable example.
12. Rearrange numbers into the lexicographically next greater permutation. Write its
algorithm, program. Find its time and space complexities. Explain with suitable
example.
13. How to merge two sorted linked lists into one sorted list. Write its algorithm, program.
Find its time and space complexities. Explain with suitable example.
14. Find the median of two sorted arrays using binary search. Write its algorithm, program.
Find its time and space complexities. Explain with suitable example.
15. Find the k-th smallest element in a sorted matrix. Write its algorithm, program. Find its
time and space complexities. Explain with suitable example.
16. Find the majority element in an array that appears more than n/2 times. Write its
algorithm, program. Find its time and space complexities. Explain with suitable
example.

1/3
17. Calculate how much water can be trapped between the bars of a histogram. Write its
algorithm, program. Find its time and space complexities. Explain with suitable
example.
18. Find the maximum XOR of two numbers in an array. Write its algorithm, program.
Find its time and space complexities. Explain with suitable example.
19. How to find the maximum product subarray. Write its algorithm, program. Find its time
and space complexities. Explain with suitable example.
20. Count all numbers with unique digits for a given number of digits. Write its algorithm,
program. Find its time and space complexities. Explain with suitable example.
21. How to count the number of 1s in the binary representation of numbers from 0 to n.
Write its algorithm, program. Find its time and space complexities. Explain with
suitable example.
22. How to check if a number is a power of two using bit manipulation. Write its algorithm,
program. Find its time and space complexities. Explain with suitable example.
23. How to find the maximum XOR of two numbers in an array. Write its algorithm,
program. Find its time and space complexities. Explain with suitable example.
24. Explain the concept of bit manipulation and its advantages in algorithm design.
25. Solve the problem of finding the next greater element for each element in an array.
Write its algorithm, program. Find its time and space complexities. Explain with
suitable example.
26. Remove the n-th node from the end of a singly linked list. Write its algorithm, program.
Find its time and space complexities. Explain with suitable example.
27. Find the node where two singly linked lists intersect. Write its algorithm, program.
Find its time and space complexities. Explain with suitable example.
28. Implement two stacks in a single array. Write its algorithm, program. Find its time and
space complexities. Explain with suitable example.
29. Write a program to check if an integer is a palindrome without converting it to a string.
Write its algorithm, program. Find its time and space complexities. Explain with
suitable example.
30. Explain the concept of linked lists and their applications in algorithm design.
31. Use a deque to find the maximum in every sliding window of size K. Write its
algorithm, program. Find its time and space complexities. Explain with suitable
example.
32. How to find the largest rectangle that can be formed in a histogram. Write its algorithm,
program. Find its time and space complexities. Explain with suitable example.
33. Explain the sliding window technique and its applications in array problems.
34. Solve the problem of finding the subarray sum equal to K using hashing. Write its
algorithm, program. Find its time and space complexities. Explain with suitable
example.

2/3
35. Find the k-most frequent elements in an array using a priority queue. Write its
algorithm, program. Find its time and space complexities. Explain with suitable
example.
36. Generate all subsets of a given array. Write its algorithm, program. Find its time and
space complexities. Explain with suitable example.
37. Find all unique combinations of numbers that sum to a target. Write its algorithm,
program. Find its time and space complexities. Explain with suitable example.
38. Generate all permutations of a given array. Write its algorithm, program. Find its time
and space complexities. Explain with suitable example.
39. Explain the difference between subsets and permutations with examples.
40. Solve the problem of finding the element with maximum frequency in an array. Write
its algorithm, program. Find its time and space complexities. Explain with suitable
example.
41. Write a program to find the maximum subarray sum using Kadane’s algorithm.
42. Explain the concept of dynamic programming and its use in solving the maximum
subarray problem.
43. Solve the problem of finding the top K frequent elements in an array. Write its
algorithm, program. Find its time and space complexities. Explain with suitable
example.
44. How to find two numbers in an array that add up to a target using hashing. Write its
algorithm, program. Find its time and space complexities. Explain with suitable
example.
45. Explain the concept of priority queues and their applications in algorithm design.
46. Write a program to find the longest palindromic substring in a given string. Write its
algorithm, program. Find its time and space complexities. Explain with suitable
example.
47. Explain the concept of histogram problems and their applications in algorithm design.
48. Solve the problem of finding the next permutation of a given array. Write its algorithm,
program. Find its time and space complexities. Explain with suitable example.
49. How to find the intersection of two linked lists. Write its algorithm, program. Find its
time and space complexities. Explain with suitable example.
50. Explain the concept of equilibrium index and its applications in array problems.

3/3

You might also like