Cerinta completa Jenna is playing a computer game involving a large map with cities numbered sequentially from to that are connected by bidirectional roads. The game’s objective is to travel to as many cities as possible without visiting any city
Direct Connections
Cerinta completa Enter-View is a linear, street-like country. By linear, we mean all the cities of the country are placed on a single straight line – the -axis. Thus every city’s position can be defined by a single coordinate, ,
Vertical Paths
Cerinta completa You have a rooted tree with vertices numbered from through where the root is vertex . You are given triplets, the triplet is denoted by three integers . The triplet represents a simple path in the tree with
Binary Search Tree : Lowest Common Ancestor
Cerinta completa You are given pointer to the root of the binary search tree and two values and . You need to return the lowest common ancestor (LCA) of and in the binary search tree. In the diagram above, the
Xor and Sum
Cerinta completa You are given two positive integers and in binary representation. You should find the following sum modulo : where operation means exclusive OR operation, operation means binary shift to the left. Please note, that we consider ideal model
Weighted Uniform Strings
Cerinta completa A weighted string is a string of lowercase English letters where each letter has a weight. Character weights are to from to as shown below: The weight of a string is the sum of the weights of its
Vertical Rooks
Cerinta completa HackerChess is a variant of chess played at HackerRank. It is a game played between two players who make moves in turns until one of them cannot make any move. The player who cannot make a move loses
Unfair Game
Cerinta completa You are playing a game of Nim with a friend. The rules are are follows: 1) Initially, there are N piles of stones. Two players play alternately. 2) In each turn, a player can choose one non empty
Two Strings
Cerinta completa Given two strings, determine if they share a common substring. A substring may be as small as one character. Example These share the common substring . These do not share a substring. Function Description Complete the function twoStrings
Tripartite Matching
Cerinta completa You are given unweighted, undirected graphs, , , and , with vertices each, where the graph has edges and the vertices in each graph are numbered from through . Find the number of ordered triples , where ,
