Truck Delivery Solution Google Kickstart 2021

Truck Delivery Solution Google Kickstart 2021 Problem Charles is a truck driver in the city of Googleland. Googleland is built in form of a tree with NN nodes where each node represents a city and each edge represents a road between two cities. The cities are numbered 11 to NN. The capital of Googleland is city 11. Each day Charles picks … Read more

Longest Progression Solution Google Kickstart 2021

Longest Progression Solution Google Kickstart 2021 Problem Sarasvati learned about arithmetic arrays. An arithmetic array is an array that contains at least two integers and the differences between consecutive integers are equal. For example, [9,10][9,10], [3,3,3][3,3,3], and [9,7,5,3][9,7,5,3] are arithmetic arrays, while [1,3,3,7][1,3,3,7], [2,1,2][2,1,2], and [1,2,4][1,2,4] are not. Sarasvati again has an array of NN non-negative integers. The ii-th integer of the array is AiAi. She can … Read more

Increasing Substring Solution Google Kickstart 2021

Increasing Substring Solution Google Kickstart 2021 Problem Your friend John just came back from vacation, and he would like to share with you a new property that he learned about strings. John learned that a string CC of length LL consisting of uppercase English characters is strictly increasing if, for every pair of indices ii and jj such that 1≤i<j≤L1≤i<j≤L (11-based), the character at position ii is … Read more

Binary Operator Solution Google Kickstart 2021

Binary Operator Solution Google Kickstart 2021 Problem You are given a list of valid arithmetic expressions using non-negative integers, parentheses (), plus +, multiply *, and an extra operator #. The expressions are fully parenthesized and in infix notation. A fully parenthesized expression is an expression where every operator and its operands are wrapped in a single parenthesis.For example, the expression x+yx+y becomes (x+y)(x+y) when … Read more

Rock Paper Scissors Solution Google Kickstart 2021

Rock Paper Scissors Solution Google Kickstart 2021 Problem You and your friend like to play Rock Paper Scissors. Each day you play exactly 6060 rounds and at the end of each day, you tally up the score from these 6060 rounds. During each round, without any knowledge of the other person’s choice, you each make your choice. Then, you both … Read more