Skip to content

Instantly share code, notes, and snippets.

View matheushf's full-sized avatar
🚀

Matheus Victor matheushf

🚀
View GitHub Profile
@matheushf
matheushf / FrogRiverOne.js
Created January 8, 2018 18:44
Javascript solution for the Codility Frog River One
function solution(X, A) {
// write your code in JavaScript (Node.js 6.4.0)
let sequence = [0];
let position = -1;
let counter = 0;
if (X === 1 && A[0] === 1)
return 0;