Cerinta completa The Utopian Tree goes through 2 cycles of growth every year. Each spring, it doubles in height. Each summer, its height increases by 1 meter. A Utopian Tree sapling with a height of 1 meter is planted at
The Value of Friendship
Cerinta completa You’re researching friendships between groups of new college students where each student is distinctly numbered from to . At the beginning of the semester, no student knew any other student; instead, they met and formed individual friendships as
String Similarity
Cerinta completa For two strings A and B, we define the similarity of the strings to be the length of the longest prefix common to both strings. For example, the similarity of strings “abc” and “abd” is 2, while the
Sum vs XOR
Cerinta completa Given an integer , find each such that: where denotes the bitwise XOR operator. Return the number of ‘s satisfying the criteria. Example There are four values that meet the criteria: Return . Function Description Complete the sumXor
Strange Counter
Cerinta completa There is a strange counter. At the first second, it displays the number . Each second, the number displayed by decrements by until it reaches . In next second, the timer resets to and continues counting down. The
The Power Sum
Cerinta completa Find the number of ways that a given integer, , can be expressed as the sum of the powers of unique, natural numbers. For example, if and , we have to find all combinations of unique squares adding
Subarray Division
Cerinta completa Two children, Lily and Ron, want to share a chocolate bar. Each of the squares has an integer on it. Lily decides to share a contiguous segment of the bar selected such that: The length of the segment
Two Characters
Cerinta completa Given a string, remove characters until the string is made up of any two alternating characters. When you choose a character to remove, all instances of that character must be removed. Determine the longest string possible that contains
The Longest Common Subsequence
Cerinta completa A subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements. Longest common subsequence (LCS) of 2 sequences is a subsequence, with maximal length, which
Stock Maximize
Cerinta completa Your algorithms have become so good at predicting the market that you now know what the share price of Wooden Orange Toothpicks Inc. (WOT) will be for the next number of days. Each day, you can either buy
