Jump Game

  1. Given N bulbs, either on(1) or off(0).

    Turning on i’th bulb causes all remaining bulbs on the right to flip,

    Find the minimum number of switches to turn all the bulbs on

    Solution:

    Bits

    0 1 0 1 0 1 1
    1 0 1 0 1 0 0
    1 1 0 1 0 1 1
    1 1 1 0 0 0 0
    1 1 1 1 1 1 1

    Cost

    0
    1
    2
    3
    4
  2. Highest Product

    Given an array, find the highest product possible.

  3. Disjoint interval

    Given a list of intervals: [start, end]

    Find the length of the maximal set of mutually disjoint intervals.

  4. Largest Permutation

    Given an array A of a random permutation of numbers from 1 to N. Given B is the number of swaps permitted in A, find the largest permitation possible

  5. Meeting Rooms

    Given a list of intervals: [s,e] for meetings, find the least number of meeting rooms required.

https://www.youtube.com/watch?v=bC7o8P_Ste4