Travel in HackerLand

Cerinta completa HackerLand is a country with beautiful cities and undirected roads. Like every other beautiful country, HackerLand has traffic jams. Each road has a crowd value. The crowd value of a path is defined as the maximum crowd value

Coloring Tree

Cerinta completa You are given a tree with N nodes with every node being colored. A color is represented by an integer ranging from 1 to 109. Can you find the number of distinct colors available in a subtree rooted

Zero-Move Nim

Cerinta completa Nim is a famous game in which two players take turns removing items from distinct piles. During each turn, a player must remove one or more items from a single, non-empty pile. The winner of the game is

Tower Breakers, Again!

Cerinta completa Two players (numbered and ) are playing a game of Tower Breakers! The rules of the game are as follows: Player always moves first. Initially there are towers of various heights. The players move in alternating turns. In

Time Conversion

Cerinta completa Given a time in -hour AM/PM format, convert it to military (24-hour) time. Note: – 12:00:00AM on a 12-hour clock is 00:00:00 on a 24-hour clock. – 12:00:00PM on a 12-hour clock is 12:00:00 on a 24-hour clock.

XOR key

Cerinta completa Xorq has invented an encryption algorithm which uses bitwise XOR operations extensively. This encryption algorithm uses a sequence of non-negative integers as its key. To implement this algorithm efficiently, Xorq needs to find maximum value of for given

Balanced Forest

Cerinta completa Greg has a tree of nodes containing integer data. He wants to insert a node with some non-zero integer value somewhere into the tree. His goal is to be able to cut two edges and have the values