DATA STRUCTURES - Topics
DATA STRUCTURES - Practice Problems
DATA STRUCTURES - Practice Problems
1. Enter an array from user and display all the value ?
2. Enter an array from user and print the array in reverse order ?
3. Enter an array from user and copy the array into second array?
4. Enter an array from user and copy it into another array in reverse order?
5. Enter an array from user and print the number which is even ?
6. Enter an array from user and print the number which is positive ?
7. Enter an array from user and square all the values of array ?
8. Enter an array from user and find maximum and minimum value?
9. Enter an array from user and find the k-th smallest value?
10. Enter an array from user and add all values ?
11. Enter an array from user and find the duplicate values?
12. Enter an array from user and remove the duplicate values and fill with zero?
13. Enter an array from user and count the duplicate values?
14. Enter an array from user and print all possible combinations of the elements?
15. Enter an array from user and print all the palindrome numbers?
16. Enter two arrays from the user and check they are same or not?
17. Merge the two sorted arrays into one array but in sorted order?
18. Find the local minima in the array? (An element in an array is a local minima if it less than the element after it, and the element before it)
19. Find the local maxima in the array? (An element in an array is a local maxima if it greater than the element after it, and the element before it)
20. Trapping Rain Water Problem: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.
Explanation -
Input: height = [0,1,0,2,1,0,1,3,2,1,2,1] Output: 6 Explanation: The above elevation map (black section) is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of rain water (blue section) are being trapped.
Expand Your Horizons with Our Free YouTube Courses
Our comprehensive YouTube courses cover a wide range of computer science and IT subjects. Each course is carefully crafted to provide you with a solid foundation and a deeper understanding of the topic. Explore our playlist of free courses and learn at your own pace. Stay ahead of the curve and boost your knowledge with our engaging video lectures.