摘要:
题目: Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, 阅读全文
摘要:
题目: Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such that the distance between iand j equ 阅读全文
摘要:
题目: You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins. Given n, find the total nu 阅读全文
摘要:
题目: Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and 阅读全文
摘要:
题目: You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not ne 阅读全文
摘要:
题目: Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space characters. Please note that the str 阅读全文
摘要:
题目: Given a sequence of words, check whether it forms a valid word square. A sequence of words forms a valid word square if the kth row and column rea 阅读全文