摘要:Description: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were i
阅读全文
摘要:Task description A positive integer D is a factor of a positive integer N if there exists an integer M such that N = D * M. For example, 6 is a factor
阅读全文
摘要:Task description An integer N is given, representing the area of some rectangle. The area of a rectangle whose sides are of length A and B is A * B, a
阅读全文
摘要:Task description A non-empty zero-indexed array A consisting of N integers is given. A triplet (X, Y, Z), such that 0 ≤ X < Y < Z < N, is called a dou
阅读全文
摘要:Task description A zero-indexed array A consisting of N integers is given. It contains daily prices of a stock share for a period of N consecutive day
阅读全文
摘要:Task description A non-empty zero-indexed array A consisting of N integers is given. The leader of this array is the value that occurs in more than ha
阅读全文
摘要:Task description A zero-indexed array A consisting of N integers is given. The dominator of array A is the value that occurs in more than half of the
阅读全文
摘要:Task description You are going to build a stone wall. The wall should be straight and N meters long, and its thickness should be constant; however, it
阅读全文
摘要:Task description A string S consisting of N characters is called properly nested if: S is empty; S has the form "(U)" where U is a properly nested str
阅读全文
摘要:Task description You are given two non-empty zero-indexed arrays A and B consisting of N integers. Arrays A and B represent N voracious fish in a rive
阅读全文
摘要:Task description A non-empty zero-indexed array A consisting of N integers is given. A pair of integers (P, Q), such that 0 ≤ P ≤ Q < N, is called a s
阅读全文
摘要:Task description A string S consisting of N characters is considered to be properly nestedif any of the following conditions is true: S is empty; S ha
阅读全文
摘要:Task description We draw N discs on a plane. The discs are numbered from 0 to N − 1. A zero-indexed array A of N non-negative integers, specifying the
阅读全文
摘要:Task description A non-empty zero-indexed array A consisting of N integers is given. Theproduct of triplet (P, Q, R) equates to A[P] * A[Q] * A[R] (0
阅读全文
摘要:Task description A zero-indexed array A consisting of N integers is given. A triplet (P, Q, R) is triangular if 0 ≤ P < Q < R < N and: A[P] + A[Q] > A
阅读全文
摘要:Task description Write a function class Solution { public int solution(int[] A); } that, given a zero-indexed array A consisting of N integers, return
阅读全文
摘要:Task description A non-empty zero-indexed array A consisting of N integers is given. A pair of integers (P, Q), such that 0 ≤ P < Q < N, is called a s
阅读全文
摘要:Task description A DNA sequence can be represented as a string consisting of the letters A, C, G and T, which correspond to the types of successive nu
阅读全文
摘要:Task description A non-empty zero-indexed array A consisting of N integers is given. The consecutive elements of array A represent consecutive cars on
阅读全文
摘要:Task description Write a function: class Solution { public int solution(int A, int B, int K); } that, given three integers A, B and K, returns the num
阅读全文