Favorite sequence

Cerinta completa Johnny, like every mathematician, has his favorite sequence of distinct natural numbers. Let’s call this sequence . Johnny was very bored, so he wrote down copies of the sequence in his big notebook. One day, when Johnny was

Fairy Chess

Cerinta completa Let’s play Fairy Chess! You have an chessboard. An -leaper is a chess piece which can move from some square to some square if ; however, its movements are restricted to up (), down (), left (), and

Even Tree

Cerinta completa You are given a tree (a simple connected graph with no cycles). Find the maximum number of edges you can remove from the tree to get a forest such that each connected component of the forest contains an

Fair Cut

Cerinta completa Li and Lu have integers, , that they want to divide fairly between the two of them. They decide that if Li gets integers with indices (which implies that Lu gets integers with indices ), then the measure

Equal

Cerinta completa Christy is interning at HackerRank. One day she has to distribute some chocolates to her colleagues. She is biased towards her friends and plans to give them more than the others. One of the program managers hears of

Extra Long Factorials

Cerinta completa The factorial of the integer , written , is defined as: Calculate and print the factorial of a given integer. For example, if , we calculate and get . Function Description Complete the extraLongFactorials function in the editor

Equalize the Array

Cerinta completa Given an array of integers, determine the minimum number of elements to delete to leave only elements of equal value. Example Delete the elements and leaving . If both twos plus either the or the are deleted, it

Drive

Cerinta completa HackerRank is starting a bus service in MountainView, California. The bus starts at time T = 0 at station1 and goes through station2, station3, station4 in that order and reaches the headquarters located at stationn. At every station,