Cerinta completa Complete the function to compute the sum of two integers. Example Return . Function Description Complete the function with the following parameters: : the first value : the second value Returns – : the sum of and Constraints
Strong Password
Cerinta completa Louise joined a social networking site to stay in touch with her friends. The signup page required her to input a name and a password. However, the password must be strong. The website considers a password to be
Swap Permutation
Cerinta completa You are given an array A = [1, 2, 3, …, n]: How many sequences (S1) can you get after exact k adjacent swaps on A? How many sequences (S2) can you get after at most k swaps
Simplified Chess Engine
Cerinta completa Chess is a very popular game played by hundreds of millions of people. Nowadays, we have chess engines such as Stockfish and Komodo to help us analyze games. These engines are very powerful pieces of well-developed software that
Sherlock and Cost
Cerinta completa In this challenge, you will be given an array and must determine an array . There is a special rule: For all , . That is, can be any number you choose such that . Your task is
String Function Calculation
Cerinta completa Jane loves strings more than anything. She has a string with her, and value of string over function can be calculated as given below: Jane wants to know the maximum value of among all the substrings of string
Similar Pair
Cerinta completa A pair of nodes, , is a similar pair if the following conditions are true: node is the ancestor of node Given a tree where each node is labeled from to , find the number of similar pairs
Substring Diff
Cerinta completa In this problem, we’ll use the term “longest common substring” loosely. It refers to substrings differing at some number or fewer characters when compared index by index. For example, ‘abc’ and ‘adc’ differ in one position, ‘aab’ and
Service Lane
Cerinta completa A driver is driving on the freeway. The check engine light of his vehicle is on, and the driver wants to get service immediately. Luckily, a service lane runs parallel to the highway. It varies in width along
Stone Game
Cerinta completa Alice and Bob are playing the game of Nim with piles of stones with sizes . If Alice plays first, she loses if and only if the ‘xor sum’ (or ‘Nim sum’) of the piles is zero, i.e.,
