A small frog wants to get to the other side of a river. The frog is initially located on one bank of the river (position 0) and wants to get to the opposite bank (position X+1). Leaves fall from a tree onto the surface of the river.
[Read More]
(Time Complexity) Tape Equilibrium
A non-empty zero-indexed array A consisting of N integers is given. Array A represents numbers on a tape.
[Read More]
(Time Complexity) Permutation Missing Element
Permutation Missing Element
(Time Complexity) Frog Jump
A small frog wants to get to the other side of the road. The frog is currently located at position X and wants to get to a position greater than or equal to Y. The small frog always jumps a fixed distance, D.
[Read More]
Cyclic Rotation of Array
This post is my exercise for codility test. The problem will be solved by using Java, since I am good at it ;) Here is the case, we are given an array A which is zero indexed with N-length. Here is the example. Array has length of 5, and to...
[Read More]