For Samsung do prepare for recursion with backtracking problems and also graph-related algorithms problems as these are most important parts of interview in Samsung. Also, you can find topic wise Data Structures and Algorithms problems on Codezen or Geeks For Geeks. You may refer them as I personally use these portals and they helped me a lot.
There is a source (S) and destination (D) and a spacecraft has to go from S to D. There are N number of wormholes in between which has the following properties:
Each wormhole has an entry and an exit.
Each wormhole is bi-directional i.e. one can enter and exit from any of the ends.
The time to cross the wormhole is given and the space craft may or may not use the wormhole to r...
Find maximum possible stolen value from houses
There are n houses build in a line, each of which contains some value in it. A thief is going to steal the maximal value of these houses, but he can’t steal in two adjacent houses because the owner of the stolen houses will tell his two neighbours left and right side. What is the maximum stolen value?
Examples:
...