You are on page 1of 2

This Week's Featured Kata

   Beginner Series #2 Clock

Clock shows 'h' hours, 'm' minutes and 's' seconds after midnight.

Your task is to make 'Past' function which returns time converted to milliseconds.

Input constraints: 0 <= h <= 23, 0 <= m <= 59, 0 <= s <= 59

Vortus

   Highest and Lowest

In this little assignment you are given a string of space separated numbers, and have
to return the highest and lowest number.

Notes:

 All numbers are valid Int32, no need to validate them.


 There will always be at least one number in the input string.
 Output string must be two numbers separated by a single space, and highest
number is first.

Deantwo

   Backspaces in string

Assume "#" is like a backspace in string. This means that string "a#bc#d" actually


is "bd"

Your task is to process a string with "#" symbols.

vetalpaprotsky
   Consecutive k-Primes

A natural number is called k-prime if it has exactly k prime factors, counted with


multiplicity. A natural number is thus prime if and only if it is 1-prime.

Task:

Given an integer k and a list arr of positive integers the function consec_kprimes


(or its variants in other languages) returns
how many times in the sequence arr numbers come up twice in a row with
exactly k prime factors?

g964

   Insane Coloured Triangles


Disclaimer

This Kata is an insane step-up from Avanta's Kata,


so I recommend to solve it first before trying this one.

Problem Description

A coloured triangle is created from a row of colours, each of which is red, green or
blue. Successive rows, each containing one fewer colour than the last, are generated
by considering the two touching colours in the previous row. If these colours are
identical, the same colour is used in the new row. If they are different, the missing
colour is used in the new row. This is continued until the final row, with only a
single colour, is generated.

You will be given the first row of the triangle as a string and its your job to return
the final colour which would appear in the bottom row as a string. In the case of the
example above, you would be given 'RRGBRGBB', and you should return 'G'.

Bubbler

You might also like