Binary number in a linked list hackerrank Solution GitHub

Arrays

  • Sort an array such that odd numbers are in front of even numbers and their relative order does not change.
  • Given an array, write a function to check if any two elements sum up to a third.
  • Given an array with all elements sorted on each individual row and column, find the kth smallest number.
  • Given an array of words, find the longest common substring between two words in the array.
  • Implement binary search on a sorted array that has been rotated once.
  • Given two unsorted arrays of integers, merge them into one sorted array.
  • Given an array of integers, find whether there is a sub-sequence that sums up to 0. Return it.
  • Write a function that fins the minimum and maximum values in an unsorted array.
  • You are given a read only array of n integers from 1 to n. Each integer appears exactly once except A which appears twice and B which is missing. Find A and B using less than O(n) space in O(n) time.
  • You're given a read only array of n integers. Find out if any integer occurs more then n/3 times in the array in linear time and constant additional space.
  • There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays.
  • Given an integer array, find the maximum sum of consecutive elements.
  • Rotate a one-dimensional array of n elements to the right by k steps. For instance, with n=7 and k=3, the array {a, b, c, d, e, f, g} is rotated to {e, f, g, a, b, c, d}.