# toy algorithm

7개의 포스트
post-thumbnail

Algorithm #07 - "Largest Product Of Three"

🇺🇸 Write a function that finds the largest possible product of the highest three numbers from an array. * Advance : Make your function handle negative numbers. - 🇦🇷 Escriba una función que encu...

2020년 1월 2일
·
0개의 댓글
post-thumbnail

Algorithm #06 - "Common Characters"

🇺🇸 Write a function commonCharacters(string1, string2) which takes two strings as arguments and returns a string containing the characters found in both strings (without duplication), in the order t...

2019년 12월 7일
·
0개의 댓글
post-thumbnail

Algorithm #05 - "Bubble Sort"

🇺🇸 Bubble sort is the most basic sorting algorithm. It works by starting at the first element of an array and comparing it to the second element; if the first element is greater than the second elem...

2019년 12월 1일
·
0개의 댓글
post-thumbnail

Algorithm #04 - "Fibonacci number"

🇺🇸 Write a function that accepts a number (n), and returns the nth Fibonacci number. A Fibonacci sequence is a list of numbers that begins with 0 and 1, and each subsequent number is the sum of the...

2019년 11월 25일
·
0개의 댓글
post-thumbnail

Algorithm #03 "Is a subset?"

🇺🇸 Make an array method that can return whether or not a context array is a subset of an input array. To simplify the problem, you can assume that neither array will contain objects or arrays as ele...

2019년 11월 25일
·
0개의 댓글
post-thumbnail

Algorithm #02 "1st non-repeated char?"

🇺🇸 Given an arbitrary input string, return the first nonrepeated character in the string. 🇦🇷 Dado una palabra u oracion aleatoria, retorne la primer letra no repetida en dicha palabra u oracion. ...

2019년 11월 22일
·
0개의 댓글
post-thumbnail

Algorithm #01 "rock, paper, scissors"

🇺🇸 Complete the function that generates every possible sequence of shoots that a player could shot. [ rock / paper / scissors ] 🇦🇷 Completa la funcion que genere todas las secuencias posibles de ...

2019년 11월 22일
·
0개의 댓글