Interesting Problems

  1. Find the minimum length of unsorted array to make the whole array as sorted
  2. Rearrange a string such that all the same characters be atleast 'd' distant apart from each other
  3. Check if a given number is prime or not
  4. Generate all the prime factors of a given number
  5. Find the longest common subsequence of two strings [DP]
  6. Find the longest common substring of two given strings
  7. Find the longest substring with all distinct characters possible
  8. Find the longest common prefix in a given set of strings
  9. Find the longest palindromic Subsequence of a given string 
  10. Find the longest possible palindrome in a given string
  11. Find the maximum sum increasing Subsequence
  12. Find the longest increasing subsequence
  13. Find the longest bitonic subsequence
  14. Find the longest consecutive subsequence
  15. Find the longest repeated subsequence
  16. Find the longest increasing path in a given matrix
  17. Find the longest increasing path with difference of 1 in a given matrix
  18. Find the smallest string that contains all the characters in other string.
  19. Find the sub array continuous sum equal to a target
  20. Find the largest sub array with equal number of 0's and 1's.
  21. Find the largest sub array with 0 sum
  22. Find the largest continuous sub array
  23. Find the largest continuous product sub array
  24. Verify if a string 't' is a subsequence of another string 't'
  25. Find a subset in given list of integers, that adds up to a given target value
  26. Check if you can partition an array of integers such that  their sums are equal
  27. Find the next largest element of an element in right of array
  28. Find the minimum cost path from a given cost matrix, to reach from [0,0] to [m,n]
  29. Find the maximum sub square matrix of 1's in a given binary input matrix
  30. Find the sub matrix sum given x,y and p,q
  31. Find the maximum sum of a sub matrix in a given matrix
  32. [R] Egg Drop Problem
  33. Find the maximum number of 1's in a bit string 1110100100111 such that you are allowed to flip only m times
  34. Josephus Problem
  35. Modify/Relocate an array such that a[i] becomes a[a[i]]
  36. Program to count number of set bits in a given integer
  37. Generate all valid parenthesis of size 2n, given n
  38. Convert a decimal to a roman numeral, limit less than 4000
  39. Implement inorder traversal without recursion - Morris
  40. Merge two BSTs with limited extra space - Use stacks + iterative order
  41. [R] Wild Card pattern matching . ? *
  42. Find the repeated element in a sorted array
  43. Find the maximum possible sum between any two leaf nodes in a binary tree
  44. Program to check if swapping of one value make two integer arrays equal
  45. Given an integer array, Find if it can be divided such that sum of every pair is divisible by 'k'
  46. DFS
  47. BFS
  48. Detect a cycle in a directed graph
  49. Topological sorting of given nodes and their dependencies
  50. Minimum distance between a source and all its destinations - Djikstra 
  51. Count number of Islands
  52. Find minimum number of swaps required to sort an integer array with a range.
  53. Find the number of strongly connected components - KOSARAJU
  54. Find the shortest path from a source to destination in a binary Matrix
  55. Find if a path exists between 1-> 2 via 3, 0 - a blocker. 1 : source, 2 : destination in a matrix.
  56. Delete the middle of linked list, Given only the middle node pointer
  57. Rectangular Histogram Problem

Comments

Post a Comment

Popular posts from this blog

sde-interview-ramp-up

Installing YUM on OpenSUSE

Youtkit - Java Profiler