Programs you must know before any interview
1.Sort element in ascending and descending order using merge sort algorthim since its time complexity and Auxiliary space is
Best,Worst and Average Case Time Complexity: O(n log n).
Auxiliary Space: O(n)
2.Sort element in ascending and descending order using bubble sort algorthim if the array is already sorted since its time complexity and Auxiliary space is
Best Case Time Complexity: O(n). Best case occurs when array is already sorted.Worst and Average Case Time Complexity: O(n²). Worst case occurs when array is reverse sorted.
Auxiliary Space: O(1)
3.Remove duplicate element from an sorted array using bubble sort algorthim
4.Remove duplicate element from an unsorted array using LinkedHashSet from collection framework or by sort the array using merge sort algorthim and remove duplicate element using bubble sort algorthim
5.Find Particular element from an sorted array using divide the array in to two halves and compare with the halves.
6.Find min and max element from an array
7.Merge two array in to single array using merge sort algorthim combine array concept
8.Print duplicate element from an sorted array using bubble sort algorthim
9.Find weather given number is prime or not
10.Find Given string is a palindrome or not
11.Print Fibonnoci series
12.Check weather two strings are anagraam or not
13.Amstrong Number
14.Factorial Program