task
stringlengths
0
154k
__index_level_0__
int64
0
39.2k
# Find the gatecrashers on CocoBongo parties CocoBongo is a club with very nice parties. However, you only can get inside if you know at least one other guest. Unfortunately, some gatecrashers can appear at those parties. The gatecrashers do not know any other party member and should not be at our amazing party! We w...
5,600
### Help Kiyo きよ solve her problems LCM Fun! Kiyo has been given a series of problems and she needs your help to solve them! You will be given a two-dimensional array such as the one below. ``` a = [ [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7...
5,601
Hello! Your are given x and y and 2D array size tuple (width, height) and you have to: <ol><li>Calculate the according index in 1D space (zero-based). </li> <li>Do reverse operation.</li> </ol> <pre>Implement: to_1D(x, y, size): --returns index in 1D space to_2D(n, size) --returns x and y in 2D space</pre> <pre> 1...
5,602
### Background Consider a 8-by-8 chessboard containing only a knight and a king. The knight wants to check the king. The king wants to avoid this. The knight has a cloaking shield, so it moves invisibly. Help the king escape the knight! ### Task You are given the initial king position, initial knight position, and t...
5,603
You have been tasked with converting a number from base i (sqrt of -1) to base 10. Recall how bases are defined: abcdef = a * 10^5 + b * 10^4 + c * 10^3 + d * 10^2 + e * 10^1 + f * 10^0 Base i follows then like this: ... i^4 + i^3 + i^2 + i^1 + i^0 The only numbers in any place will be 1 or 0 Examples: ...
5,604
**This Kata is intended as a small challenge for my students** All Star Code Challenge #29 Your friend Nhoj has dislexia, but can easily read messages if the words are written backwards. Create a function called `reverseSentence()/reverse_sentence()` that accepts a string argument. The function returns a string of ...
5,605
Complete the code which should return `true` if the given object is a single ASCII letter (lower or upper case), `false` otherwise.
5,606
### Combine strings function ```if:coffeescript,haskell,javascript Create a function named `combineNames` that accepts two parameters (first and last name). The function should return the full name. ``` ```if:python,ruby Create a function named (`combine_names`) that accepts two parameters (first and last name). The fu...
5,607
Create a function that takes a string and separates it into a sequence of letters. The array will be formatted as so: ```javascript,python [['J','L','L','M'] ,['u','i','i','a'] ,['s','v','f','n'] ,['t','e','e','']] ``` The function should separate each word into individual letters, with the first word in the sentence ...
5,608
Given an array (or list) of scores, return the array of _ranks_ for each value in the array. The largest value has rank 1, the second largest value has rank 2, and so on. Ties should be handled by assigning the same rank to all tied values. For example: ranks([9,3,6,10]) = [2,4,3,1] and ranks([3,3,3,3,3,5,1...
5,609
You have to write a function that takes for input a 8x8 chessboard in the form of a bi-dimensional array of chars (or strings of length 1, depending on the language) and returns a boolean indicating whether the king is in check. The array will include 64 squares which can contain the following characters : ```if:c,h...
5,610
Given that ``` f0 = '0' f1 = '01' f2 = '010' = f1 + f0 f3 = '01001' = f2 + f1 ``` You will be given a number and your task is to return the `nth` fibonacci string. For example: ``` solve(2) = '010' solve(3) = '01001' ``` More examples in test cases. Good luck! If you like sequence Katas, you will enjoy this Kata: ...
5,611
This series of katas will introduce you to basics of doing geometry with computers. Point objects have `x`, `y` attributes. Circle objects have `center` which is a `Point`, and `radius` which is a number. Write a function calculating distance between `Circle a` and `Circle b`. If they're overlapping or one is comple...
5,612
All Unix user know the command line `history`. This one comes with a set of useful commands know as the `bang` command. For more information about the history command line you can take a look at: - The man page -> simply type `man history` in your terminal. - The online man page [here](https://linux.die.net/man/3/h...
5,613
Santa has misplaced his list of gift to all the children, he has however a condensed version lying around. In this condensed verison, instead of a list of gifts for each child, each one has an integer. He also have a list of gifts corresponding to each integer. His list is as follows: ```ruby GIFTS = { 1 => 'Toy...
5,614
Input: - a string `strng` - an array of strings `arr` Output of function `contain_all_rots(strng, arr) (or containAllRots or contain-all-rots)`: - a boolean `true` if all rotations of `strng` are included in `arr` - `false` otherwise #### Examples: ``` contain_all_rots( "bsjq", ["bsjq", "qbsj", "sjqb", "twZNsslC...
5,615
In this simple exercise, you will create a program that will take two lists of integers, `a` and `b`. Each list will consist of 3 positive integers above 0, representing the dimensions of cuboids `a` and `b`. You must find the difference of the cuboids' volumes regardless of which is bigger. For example, if the parame...
5,616
Your task in this kata is to implement a function that calculates the sum of the integers inside a string. For example, in the string <code>"The30quick20brown10f0x1203jumps914ov3r1349the102l4zy dog"</code>, the sum of the integers is <code>3635</code>. *Note: only positive integers will be tested.*
5,617
# Task Numpy has a function [numpy.fmax](https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.fmax.html) which computes the element-wise maximum for two arrays. However, there are two problems with this: First, you don't want to get numpy just to use this function. Second, you want a *in-place* version o...
5,618
# Rock Paper Scissors Let's play! You have to return which player won! In case of a draw return `Draw!`. **Examples(Input1, Input2 --> Output):** ``` "scissors", "paper" --> "Player 1 won!" "scissors", "rock" --> "Player 2 won!" "paper", "paper" --> "Draw!" ``` ![rockpaperscissors](http://i.imgur.com/aimOQVX.png)
5,619
In English there are types of words called nouns which are persons, places, or things. There are two main classifications of nouns: common and proper nouns. In the common nouns there is another set of classifications that includes collective, compound, and normal nouns. Today we are focused on classifying compound noun...
5,620
<img src = https://pbs.twimg.com/media/CWTTemEWcAER1Rk.jpg> What do action men wear? Isn't it obvious? 1) Shirt. 2) Cowboy Boots. 3) ACTION PANTS!! Any self respecting action hero heading out to cause some trouble knows the uniform... If you see a man striding towards you in this outfit you should be very careful, he'...
5,621
Many programming languages provide the functionality of converting a string to uppercase or lowercase. For example, `upcase`/`downcase` in Ruby, `upper`/`lower` in Python, and `toUpperCase`/`toLowerCase` in Java/JavaScript, `uppercase`/`lowercase` in Kotlin. Typically, these methods won't change the size of the string....
5,622
## Trilingual democracy Switzerland has [four official languages](https://www.fedlex.admin.ch/eli/cc/2009/821/en#art_5): German, French, Italian, and Romansh.<sup>1</sup> When native speakers of one or more of these languages meet, they follow certain [regulations](https://www.fedlex.admin.ch/eli/cc/2010/355/en) to c...
5,623
# Task John and Alice have an appointment today. In the morning, John starts from (`0,0`) and goes to the place (`a,b`) where he is dating. Unfortunately, John had no sense of direction at all, so he moved 1 step in a random direction(up, down, left or right) each time. For example, if John at (x,y), next step he ma...
5,624
### What is simplifying a square root? If you have a number, like 80, for example, you would start by finding the greatest perfect square divisible by 80. In this case, that's 16. Find the square root of 16, and multiply it by 80 / 16. Answer = 4 √5. ##### The above example: ```math \sqrt{80} = \sqrt{5\times 16} ...
5,625
Create a function that transforms any positive number to a string representing the number in words. The function should work for all numbers between 0 and 999999. ### Examples ``` number2words(0) ==> "zero" number2words(1) ==> "one" number2words(9) ==> "nine" number2words(10) ==> "ten" number2words(17) ==> ...
5,626
You will be given an array which will include both integers and characters. Return an array of length 2 with a[0] representing the mean of the ten integers as a floating point number. There will always be 10 integers and 10 characters. Create a single string with the characters and return it as a[1] while maintaining...
5,627
# Task Your task is to find the similarity of given sorted arrays `a` and `b`, which is defined as follows: you take the number of elements which are present in both arrays and divide it by the number of elements which are present in at least one array. It also can be written as a formula `similarity(A, B) = #(A...
5,628
Write a function that returns the number of occurrences of an element in an array. ~~~if:javascript This function will be defined as a property of Array with the help of the method `Object.defineProperty`, which allows to define a new method **directly** on the object (more info about that you can find on [MDN](https:...
5,629
An array of different positive integers is given. We should create a code that gives us the number (or the numbers) that has (or have) the highest number of divisors among other data. The function ```proc_arrInt()```, (Javascript: ```procArrInt()```) will receive an array of unsorted integers and should output a list ...
5,630
Given an array, find the duplicates in that array, and return a new array of those duplicates. The elements of the returned array should appear in the order when they first appeared as duplicates. __*Note*__: numbers and their corresponding string representations should not be treated as duplicates (i.e., `"1" != 1`)....
5,631
The Evil King of Numbers wants to conquer all space in the Digital World. For that reason, His Evilness declared war on Letters, which actually stay in the Alphabet Fragmentation. You were nominated the Great Arbiter and must provide results of battles to the technology God 3 in 1, Llib Setag-Kram Grebrekcuz-Nole Ksum....
5,632
In this kata, your task is to create all permutations of a non-empty input string and remove duplicates, if present. Create as many "shufflings" as you can! Examples: ``` With input 'a': Your function should return: ['a'] With input 'ab': Your function should return ['ab', 'ba'] With input 'abc': Your function sho...
5,633
Given a string with friends to visit in different states: ``` ad3="John Daggett, 341 King Road, Plymouth MA Alice Ford, 22 East Broadway, Richmond VA Sal Carpenter, 73 6th Street, Boston MA" ``` we want to produce a result that sorts the names by state and lists the name of the state followed by the name of each person...
5,634
Given an array containing only zeros and ones, find the index of the zero that, if converted to one, will make the longest sequence of ones. For instance, given the array: ``` [1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1] ``` replacing the zero at index 10 (counting from 0) forms a sequence of 9 ones: `...
5,635
There are several difficulty of sudoku games, we can estimate the difficulty of a sudoku game based on how many cells are given of the 81 cells of the game. - Easy sudoku generally have over 32 givens - Medium sudoku have around 30–32 givens - Hard sudoku have around 28–30 givens - Very Hard sudoku have less than 28 g...
5,636
## Overview In this kata, `n` grains of rice will be initially placed at `n` **distinct** squares on a 2-dimensional rectangular board. For example, if a particular grain starts on the board square at `x=3` and `y=8` it will be given starting "integer coordinates" `(3,8)`. To keep things simple, all grains will alwa...
5,637
#It's show time! Archers have gathered from all around the world to participate in the Arrow Function Faire. But the faire will only start if there are archers signed and if they all have enough arrows in their quivers - at least 5 is the requirement! Are all the archers ready? #Reference https://developer.mozilla.org...
5,638
I have the `par` value for each hole on a golf course and my stroke `score` on each hole. I have them stored as strings, because I wrote them down on a sheet of paper. Right now, I'm using those strings to calculate my golf score by hand: take the difference between my actual `score` and the `par` of the hole, and add...
5,639
Bob is a theoretical coder - he doesn't write code, but comes up with theories, formulas and algorithm ideas. You are his secretary, and he has tasked you with writing the code for his newest project - a method for making the short form of a word. Write a function ```shortForm```(C# ```ShortForm```, Python ```short_for...
5,640
In this kata, your job is to create a class Dictionary which you can add words to and their entries. Example: ```python >>> d = Dictionary() >>> d.newentry('Apple', 'A fruit that grows on trees') >>> print(d.look('Apple')) A fruit that grows on trees >>> print(d.look('Banana')) Can't find entry for Banana ``` ```jav...
5,641
Each floating-point number should be formatted that only the first two decimal places are returned. You don't need to check whether the input is a valid number because only valid numbers are used in the tests. Don't round the numbers! Just cut them after two decimal places! ``` Right examples: 32.8493 is 32.84 1...
5,642
You are in the capital of Far, Far Away Land, and you have heard about this museum where the royal family's crown jewels are on display. Before you visit the museum, a friend tells you to bring some extra money that you'll need to bribe the guards. You see, he says, the crown jewels are in one of 10 rooms numbered from...
5,643
One suggestion to build a satisfactory password is to start with a memorable phrase or sentence and make a password by extracting the first letter of each word. Even better is to replace some of those letters with numbers (e.g., the letter `O` can be replaced with the number `0`): * instead of including `i` or `I` p...
5,644
The story of the famous Disney-Pixar animated movie "Up" is based on the main character Carl Fredricksen journey in his home equipped with balloons. But can this happen for real? What kind of objects can you lift with helium balloons? How many balloons do you need? In this kata you will create a class ``Journey(ob...
5,645
Data: an array of integers, a function f of two variables and an init value. `Example: a = [2, 4, 6, 8, 10, 20], f(x, y) = x + y; init = 0` Output: an array of integers, say r, such that `r = [r[0] = f(init, a[0]), r[1] = f(r[0], a[1]), r[2] = f(r[1], a[2]), ...]` With our example: `r = [2, 6, 12, 20, 30, 50]` ###...
5,646
## Task Create a function called `one` that accepts two params: * a sequence * a function and returns `true` only if the function in the params returns `true` for exactly one (`1`) item in the sequence. ## Example ``` one([1, 3, 5, 6, 99, 1, 3], bigger_than_ten) -> true one([1, 3, 5, 6, 99, 88, 3], bigger_than_t...
5,647
## Task Write a method `remainder` which takes two integer arguments, `dividend` and `divisor`, and returns the remainder when dividend is divided by divisor. Do <b>NOT</b> use the modulus operator (%) to calculate the remainder! #### Assumption Dividend will always be `greater than or equal to` divisor. #### Notes...
5,648
Complete the function that returns a christmas tree of the given height. The height is passed through to the function and the function should return a list containing each line of the tree. ``` XMasTree(5) should return : ['____#____', '___###___', '__#####__', '_#######_', '#########', '____#____', '____#____'] XMasT...
5,649
### Color Ghost Create a class Ghost Ghost objects are instantiated without any arguments. Ghost objects are given a random color attribute of "white" or "yellow" or "purple" or "red" when instantiated ```javascript ghost = new Ghost(); ghost.color //=> "white" or "yellow" or "purple" or "red" ``` ```coffeescript gh...
5,650
Given a time in AM/PM format as a string, convert it to 24-hour [military time](https://en.wikipedia.org/wiki/24-hour_clock#Military_time) time as a string. Midnight is `12:00:00AM` on a 12-hour clock, and `00:00:00` on a 24-hour clock. Noon is `12:00:00PM` on a 12-hour clock, and `12:00:00` on a 24-hour clock Try no...
5,651
**This Kata is intended as a small challenge for my students** All Star Code Challenge #16 Create a function called noRepeat() that takes a string argument and returns a single letter string of the **first** not repeated character in the entire string. ```javascript noRepeat("aabbccdde") // => "e" noRepeat("wxyz") /...
5,652
Removed due to copyright infringement. <!--- &ensp;Little Petya very much likes computers. Recently he has received a new "Ternatron IV" as a gift from his mother. Unlike other modern computers, "Ternatron IV" operates with ternary and not binary logic. Petya immediately wondered how the xor operation is performed on...
5,653
You get a list of nodes. Return the sorted list of nodes without any duplicates. See example test cases for expected inputs and outputs. ( Node data structure is inspired by `Cytoscape.js JSON`) ## Restriction ``` Your code length should not be longer than 85 characters. ```
5,654
Coding decimal numbers with factorials is a way of writing out numbers in a base system that depends on factorials, rather than powers of numbers. In this system, the last digit is always `0` and is in base 0!. The digit before that is either `0 or 1` and is in base 1!. The digit before that is either `0, 1, or 2` a...
5,655
A "Lucky Seven" is the number seven surrounded by numbers that add up to form a perfect cube. The surrounding numbers will be described as the numbers directly above, below, and next to (not diagonally) the number 7. You will be given a 2D array containing at least 1 lucky seven. Your function should return the number ...
5,656
Let us take a string composed of decimal digits: `"10111213"`. We want to code this string as a string of `0` and `1` and after that be able to decode it. To code we decompose the given string in its decimal digits (in the above example: `1 0 1 1 1 2 1 3`) and we will code each digit. #### Coding process to code a nu...
5,657
In this Kata, you will be given a string and your task is to return the most valuable character. The value of a character is the difference between the index of its last occurrence and the index of its first occurrence. Return the character that has the highest value. If there is a tie, return the alphabetically lowest...
5,658
Conways game of life (https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) is usually implemented without considering neigbouring cells that would be outside of the arrays range, but another way to do it is by considering the left and right edges of the array to be stitched together, and the top and bottom edges also...
5,659
# The President's phone is broken He is not very happy. The only letters still working are uppercase ```E```, ```F```, ```I```, ```R```, ```U```, ```Y```. An angry tweet is sent to the department responsible for presidential phone maintenance. # Kata Task Decipher the tweet by looking for words with known meaning...
5,660
# Task We call letter `x` a counterpart of letter `y`, if `x` is the `i`th letter of the English alphabet, and `y` is the `(27 - i)`th for each valid `i` (1-based). For example, `'z'` is the counterpart of `'a'` and vice versa, `'y'` is the counterpart of `'b'`, and so on. A properly closed bracket word (`PCBW`) is ...
5,661
### Task Given an array of numbers and an index, return either the index of the smallest number that is larger than the element at the given index, or `-1` if there is no such index ( or, where applicable, `Nothing` or a similarly empty value ). ### Notes Multiple correct answers may be possible. In this case, retur...
5,662
## <span style="color:#0ae">Luhn algorithm</span> The *Luhn algorithm* is a simple checksum formula used to validate credit card numbers and other identification numbers. #### Validation - Take the decimal representation of the number. - Starting from rightmost digit and moving left, double every second digit; if th...
5,663
You are provided with a skeleton of the class 'Fraction', which accepts two arguments (numerator, denominator). EXAMPLE: ```python fraction1 = Fraction(4, 5) ``` ```csharp Fraction fraction1 = new Fraction(4, 5); ``` ```haskell fraction1 = fraction 4 5 ``` ```java Fraction fraction1 = new Fraction(4, 5); ``` Your tas...
5,664
# Task Calculate a chess player's new Elo rating using their previous ratings (`experience`), their opponent's rating (`opponent`), the outcome of the new game (`score`), and the Factor k function (`k`). ## Arguments * `experience` is an array/list containing the history of the player's ratings, with the last item in ...
5,665
Given a list of unique words. Find all pairs of distinct indices (i, j) in the given list so that the concatenation of the two words, i.e. words[i] + words[j] is a palindrome. Examples: ```ruby ["bat", "tab", "cat"] # [[0, 1], [1, 0]] ["dog", "cow", "tap", "god", "pat"] # [[0, 3], [2, 4], [3, 0], [4, 2]] ["abcd", "dcb...
5,666
The AKS algorithm for testing whether a number is prime is a polynomial-time test based on the following theorem: A number p is prime if and only if all the coefficients of the polynomial expansion of `(x − 1)^p − (x^p − 1)` are divisible by `p`. For example, trying `p = 3`: (x − 1)^3 − (x^3 − 1) = (x^3 − 3x^2...
5,667
# Kata Task Given a list of random integers, return the <span style='color:red'>Three Amigos</span>. These are 3 numbers that live next to each other in the list, and who have the **most** in common with each other by these rules: * lowest statistical <a href="https://en.wikipedia.org/wiki/Range_(statistics)">range</...
5,668
Your task is to write a function which returns the sum of a sequence of integers. The sequence is defined by 3 non-negative values: **begin**, **end**, **step**. If **begin** value is greater than the **end**, your function should return **0**. If **end** is not the result of an integer number of steps, then don't ad...
5,669
# Introduction Digital Cypher assigns a unique number to each letter of the alphabet: ``` a b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 ``` In the encrypted word we write the corresponding numbers instead o...
5,670
**1. - You are given an array of positive integers as argument. You must generate all the possible divisions between each pair of its elements that outputs an integer value.** For example: ``` arr = [2, 4, 27, 16, 9, 15, 25, 6, 12, 83, 24, 49, 7, 5, 94, 12, 6] ``` You must then create a list, sorted by the quotient va...
5,671
Convert Decimal Degrees to Degrees, Minutes, Seconds. Remember: 1 degree = 60 minutes; 1 minute = 60 seconds. Input: Positive number. Output: Array [degrees, minutes, seconds]. E.g [30, 25, 25] Trailing zeroes should be omitted in the output. E.g ``` convert (50) //correct output -> [50] //wrong output -> [50, ...
5,672
Given an integer `n` and two other values, build an array of size `n` filled with these two values alternating. ## Examples ```ruby 5, true, false --> [true, false, true, false, true] 10, "blue", "red" --> ["blue", "red", "blue", "red", "blue", "red", "blue", "red", "blue", "red"] 0, "one", "two" --> [] ``...
5,673
Complete the function that takes one argument, a list of words, and returns the length of the longest word in the list. For example: ```python ['simple', 'is', 'better', 'than', 'complex'] ==> 7 ``` Do not modify the input list.
5,674
The queen can be moved any number of unoccupied squares in a straight line vertically, horizontally, or diagonally, thus combining the moves of the rook and bishop. The queen captures by occupying the square on which an enemy piece sits. (wikipedia: https://en.wikipedia.org/wiki/Queen_(chess)). ## Task: Write a functi...
5,675
We have the following sequence: ```python f(0) = 0 f(1) = 1 f(2) = 1 f(3) = 2 f(4) = 4; f(n) = f(n-1) + f(n-2) - f(n-3) + f(n-4) - f(n-5); ``` The first term of the sequence that has its last nine digits forms a prime number is the value, 8480150779 (total of 10 digits), and corresponds to the 92-th term, because 48015...
5,676
Create a function to determine whether or not two circles are colliding. You will be given the position of both circles in addition to their radii: ```javascript function collision(x1, y1, radius1, x2, y2, radius2) { // collision? } ``` ```c bool IsCollision(float x1, float y1, float r1, float x2, float y2, float r2...
5,677
## Introduction There is a war and nobody knows - the alphabet war! There are two groups of hostile letters. The tension between left side letters and right side letters was too high and the war began. The battlefield is a complete chaos, riddled with trenches and full of scattered troops. We need a good map of what...
5,678
## This Kata is the first of three katas that I'm making on the game of hearts. We're getting started by simply scoring a hand, and working our way up to scoring a whole game! In this Kata, your goal is to evaluate a single hand of hearts, and determine the winning card. Follow this link (https://gamerules.com/rules/...
5,679
If we alternate the vowels and consonants in the string `"have"`, we get the following list, arranged alphabetically: `['ahev', 'aveh', 'ehav', 'evah', 'have', 'heva', 'vahe', 'veha']`. These are the only possibilities in which vowels and consonants are alternated. The first element, `ahev`, is alphabetically lowest. ...
5,680
You're in ancient Greece and giving Philoctetes a hand in preparing a training exercise for Hercules! You've filled a pit with two different ferocious mythical creatures for Hercules to battle! **Orthus** ![Orthus](https://s-media-cache-ak0.pinimg.com/236x/09/8c/8c/098c8c566eefc97ef000731f73fd6478.jpg) **Hydra** ![...
5,681
Determine the **area** of the largest square that can fit inside a circle with radius *r*.
5,682
Given any number of boolean flags function should return true if and only if one of them is true while others are false. If function is called without arguments it should return false. ```javascript onlyOne() --> false onlyOne(true, false, false) --> true onlyOne(true, false, false, true) --> false onlyOne(fal...
5,683
You are writing an encoder/decoder to convert between javascript strings and a binary representation of Morse code. Each Morse code character is represented by a series of "dots" and "dashes". In binary, a dot is a single bit (`1`) and a dash is three bits (`111`). Between each dot or dash within a single character, w...
5,684
# Task Your task in the kata is to determine how many boats are sunk damaged and untouched from a set amount of attacks. You will need to create a function that takes two arguments, the playing board and the attacks. # Example Game ### The board <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>...
5,685
Consider an array containing cats and dogs. Each dog can catch only one cat, but cannot catch a cat that is more than `n` elements away. Your task will be to return the maximum number of cats that can be caught. For example: ```Haskell solve(['D','C','C','D','C'], 2) = 2, because the dog at index 0 (D0) catches C1 and...
5,686
If you haven't already done so, you should do the [5x5](https://www.codewars.com/kata/5x5-nonogram-solver/) and [15x15](https://www.codewars.com/kata/15x15-nonogram-solver/) Nonogram solvers first. In this kata, you have to solve nonograms from any size up to one with an average side length of 50. The nonograms are no...
5,687
Write a function that accepts a string, and returns true if it is in the form of a phone number. <br/>Assume that any integer from 0-9 in any of the spots will produce a valid phone number.<br/> Only worry about the following format:<br/> (123) 456-7890 (don't forget the space after the close parentheses) <br/> <br/...
5,688
In number theory, an **[abundant](https://en.wikipedia.org/wiki/Abundant_number)** number or an **[excessive](https://en.wikipedia.org/wiki/Abundant_number)** number is one for which the sum of it's **[proper divisors](http://mathworld.wolfram.com/ProperDivisor.html)** is greater than the number itself. The integer *...
5,689
[Gratipay](https://gratipay.com) helps fund open source projects by providing a platform for weekly tips/donations. The current homepage lists **all** projects, along with images. Due to an ever-increasing number of projects, Gratipay is now hitting scaling problems! Help Gratipay design a solution such that only a ha...
5,690
My friend wants a new band name for her band. She like bands that use the formula: "The" + a noun with the first letter capitalized, for example: `"dolphin" -> "The Dolphin"` However, when a noun STARTS and ENDS with the same letter, she likes to repeat the noun twice and connect them together with the first and last...
5,691
# Letterss of Natac In a game I just made up that doesn’t have anything to do with any other game that you may or may not have played, you collect resources on each turn and then use those resources to build things like roads, settlements and cities. If you would like to try other kata about this game, they can be foun...
5,692
In this Kata, you will count the number of times the first string occurs in the second. ```Haskell solve("zaz","zazapulz") = 4 because they are ZAZapulz, ZAzapulZ, ZazApulZ, zaZApulZ ``` More examples in test cases. Good luck! Please also try [Simple time difference](https://www.codewars.com/kata/5b76a34ff71e5de9...
5,693
# Reducing by rules to get the result Your task is to reduce a list of numbers to one number.<br> For this you get a list of rules, how you have to reduce the numbers.<br> You have to use these rules consecutively. So when you get to the end of the list of rules, you start again at the beginning. An example is cleare...
5,694
Complete the method/function so that it converts dash/underscore delimited words into [camel casing](https://en.wikipedia.org/wiki/Camel_case). The first word within the output should be capitalized **only** if the original word was capitalized (known as Upper Camel Case, also often referred to as Pascal case). The nex...
5,695
# Task There's a wolf who lives in the plane forest, which is located on the `Cartesian coordinate system`. When going on the hunt, the wolf starts at point `(0, 0)` and goes `spirally` as shown in the picture below: ![](https://i.gyazo.com/cad8fce0e87dcb1d45dc345dbb22f6c2.png) The wolf finally found something to eat...
5,696
For this kata, you are given three points ```(x1,y1,z1)```, ```(x2,y2,z2)```, and ```(x3,y3,z3)``` that lie on a straight line in 3-dimensional space. You have to figure out which point lies in between the other two. Your function should return 1, 2, or 3 to indicate which point is the in-between one.
5,697
In this Kata, you will be given directions and your task will be to find your way back. ```Perl solve(["Begin on Road A","Right on Road B","Right on Road C","Left on Road D"]) = ['Begin on Road D', 'Right on Road C', 'Left on Road B', 'Left on Road A'] solve(['Begin on Lua Pkwy', 'Right on Sixth Alley', 'Right on 1st ...
5,698
<strong>Continuation to <a href="http://www.codewars.com/kata/pythons-dynamic-classes-number-1"> Python's Dynamic Classes #1 Kata</a></strong>. <br/> <br/> <em>- That name changing function is awesome!</em> - Timmy heard from his boss - <em> but would it not be possible to hide somehow that function in classes itself?<...
5,699