(Counting Elements) Frog River One

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]
Tags: counting elements, java, algorithms

(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]
Tags: time complexity, java, algorithms

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]
Tags: array, java, algorithms