Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

Projects in Awesome Lists tagged with code-wars-solution

A curated list of projects in awesome lists tagged with code-wars-solution .

https://github.com/bell-kevin/theshellgame

"The Shell Game" involves cups upturned on a playing surface, with a ball placed underneath one of them. The index of the cups are swapped around multiple times. After that the players will try to find which cup contains the ball. Your task is as follows. Given the cup that the ball starts under, and list of swaps, return the location of the ball at the end. Cups are given like array/list indices. For example, given the starting position 0 and the swaps [(0, 1), (1, 2), (1, 0)]: The first swap moves the ball from 0 to 1 The second swap moves the ball from 1 to 2 The final swap doesn't affect the position of the ball. So swaps = [[0,1], [1,2], [1, 0]] find_the_ball(0, swaps) == 2 There aren't necessarily only three cups in this game, but there will be at least two. You can assume all swaps are valid, and involve two distinct indices.

code-wars code-wars-solution

Last synced: 23 Nov 2024

https://github.com/bell-kevin/rot13

ROT13 is a simple letter substitution cipher that replaces a letter with the letter 13 letters after it in the alphabet. ROT13 is an example of the Caesar cipher. Create a function that takes a string and returns the string ciphered with Rot13. If there are numbers or special characters included in the string, they should be returned as they are. Only letters from the latin/english alphabet should be shifted, like in the original Rot13 "implementation".

code-wars code-wars-solution

Last synced: 23 Nov 2024

https://github.com/bell-kevin/persistentbugger

Write a function, persistence, that takes in a positive parameter num and returns its multiplicative persistence, which is the number of times you must multiply the digits in num until you reach a single digit. For example (Input --> Output): 39 --> 3 (because 3*9 = 27, 2*7 = 14, 1*4 = 4 and 4 has only one digit) 999 --> 4 (because 9*9*9 = 729, 7*2*9 = 126, 1*2*6 = 12, and finally 1*2 = 2) 4 --> 0 (because 4 is already a one-digit number)

code-wars-solution codewars-kata-solution

Last synced: 23 Nov 2024

https://github.com/bell-kevin/jadensmith

Jaden Smith, the son of Will Smith, is the star of films such as The Karate Kid (2010) and After Earth (2013). Jaden is also known for some of his philosophy that he delivers via Twitter. When writing on Twitter, he is known for almost always capitalizing every word. For simplicity, you'll have to capitalize each word, check out how contractions are expected to be in the example below. Your task is to convert strings to how they would be written by Jaden Smith. The strings are actual quotes from Jaden Smith, but they are not capitalized in the same way he originally typed them. Example: Not Jaden-Cased: "How can mirrors be real if our eyes aren't real" Jaden-Cased: "How Can Mirrors Be Real If Our Eyes Aren't Real" Link to Jaden's former Twitter account @officialjaden via archive.org

code-wars-solution codewars-kata-solution

Last synced: 23 Nov 2024

https://github.com/bell-kevin/fibonacci-tribonacci-and-friends

If you have completed the Tribonacci sequence kata, you would know by now that mister Fibonacci has at least a bigger brother. If not, give it a quick look to get how things work. Well, time to expand the family a little more: think of a Quadribonacci starting with a signature of 4 elements and each following element is the sum of the 4 previous, a Pentabonacci (well Cinquebonacci would probably sound a bit more italian, but it would also sound really awful) with a signature of 5 elements and each following element is the sum of the 5 previous, and so on. Well, guess what? You have to build a Xbonacci function that takes a signature of X elements - and remember each next element is the sum of the last X elements - and returns the first n elements of the so seeded sequence.

code-wars code-wars-solution

Last synced: 23 Nov 2024

https://github.com/bell-kevin/datareverse

A stream of data is received and needs to be reversed. Each segment is 8 bits long, meaning the order of these segments needs to be reversed, for example: 11111111 00000000 00001111 10101010 (byte1) (byte2) (byte3) (byte4) should become: 10101010 00001111 00000000 11111111 (byte4) (byte3) (byte2) (byte1) The total number of bits will always be a multiple of 8. The data is given in an array as such: [1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,1,0,1,0,1,0] Note: In the C and NASM languages you are given the third parameter which is the number of segment blocks.

code-wars-solution

Last synced: 23 Nov 2024

https://github.com/bell-kevin/countingvalleys

code wars solution to Counting Valleys on codeWars.com for JavaScript

code-wars code-wars-solution

Last synced: 23 Nov 2024

https://github.com/bell-kevin/consonant-value

Given a lowercase string that has alphabetic characters only and no spaces, return the highest value of consonant substrings. Consonants are any letters of the alphabet except "aeiou". We shall assign the following values: a = 1, b = 2, c = 3, .... z = 26. For example, for the word "zodiacs", let's cross out the vowels. We get: "z o d ia cs" -- The consonant substrings are: "z", "d" and "cs" and the values are z = 26, d = 4 and cs = 3 + 19 = 22. The highest is 26. solve("zodiacs") = 26 For the word "strength", solve("strength") = 57 -- The consonant substrings are: "str" and "ngth" with values "str" = 19 + 20 + 18 = 57 and "ngth" = 14 + 7 + 20 + 8 = 49. The highest is 57. For C: do not mutate input.

code-wars-solution

Last synced: 23 Nov 2024

https://github.com/mohamedcuerci/exercicios-ruby

só uns codigo que eu faço quando vou tirar alguma duvida de sintaxe ou algo do tipo usando a linguagem ruby

code-wars code-wars-solution desafios ruby

Last synced: 11 Dec 2024