Write a function that takes an integer as input, and returns the number of bits that are equal to one in the binary representation of that number.
In this kata your task is to create bit calculator.
You like building blocks. You especially like building blocks that are squares.
- we want to find a positive integer k, if it exists, such as the sum of the digits of n taken to the successive powers of p is equal to k * n.
Complete the method/function so that it converts dash/underscore delimited words into camel casing.
Move the first letter of each word to the end of it, then add "ay" to the end of the word. Leave punctuation marks untouched.
In this kata you are required to, given a string, replace every letter with its position in the alphabet.
In this kata, you will write a function that returns the positions and the values of the "peaks" (or local maxima) of a numeric array.
A format for expressing an ordered list of integers is to use a comma separated list of either
Greed is a dice game played with five six-sided dice. Your mission, should you choose to accept it, is to score a throw according to these rules.
Write a function, which takes a non-negative integer (seconds) as input and returns the time in a human-readable format
Write a function that takes a string input, and returns the first character that is not repeated anywhere in the string itself
A friend of mine takes the sequence of all numbers from 1 to n (where n > 0).Within that sequence, he chooses two numbers, a and b.
Alright, detective, one of our colleagues successfully observed our target person, Robby the robber.
Create a function that takes a positive integer and returns the next bigger number that can be formed by rearranging its digits. For example:
Your task in order to complete this Kata is to write a function which formats a duration
Given a Sudoku data structure with size NxN, N > 0 and √N == integer, write a method to validate if it has been filled out correctly.
What is an anagram? Well, two words are anagrams of each other if they both contain the same letters.
A rectangle with sides equal to even integers a and b is drawn on the Cartesian plane. Its center (the intersection point of its diagonals) coincides
Write a program that will calculate the number of trailing zeros in a factorial of a given number.N! = 1 \* 2 \* 3 \* ... \* NBe careful 1000! has 256
Pyramids are amazing! Both in architectural and mathematical sense. If you have a computer, you can mess with pyramids even if you are not in Egypt at
Write a function called `sumIntervals`/`sum_intervals()` that accepts an array of intervals, and returns the sum of all the interval lengths.
Complete the solution so that it strips all text that follows any of a set of comment markers passed in.
Write a function that takes an array of values and moves all elements that are zero to the end of the array, otherwise preserving the order of the arr
… a man was given directions to go from one point to another. The directions were "NORTH", "SOUTH", "WEST", "EAST".
Write a function that takes a string of parentheses, and determines if the order of the parentheses is valid.