摘要:
Given the coordinates of four points in 2D space, return whether the four points could construct a square. The coordinate (x,y) of a point is represen 阅读全文
摘要:
Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements 阅读全文
摘要:
Given a non-empty integer array, find the minimum number of moves required to make all array elements equal, where a move is incrementing a selected e 阅读全文
摘要:
Given two integers n and k, you need to construct a list which contains n different positive integers ranging from 1 to n and obeys the following requ 阅读全文
摘要:
A zero-indexed array A consisting of N different integers is given. The array contains all integers in the range [0, N - 1]. Sets S[K] for 0 <= K < N 阅读全文
摘要:
Given an 2D board, count how many battleships are in it. The battleships are represented with 'X's, empty slots are represented with'.'s. You may assu 阅读全文
摘要:
Given a list of positive integers, the adjacent integers will perform the float division. For example, [2,3,4] -> 2 / 3 / 4. However, you can add any 阅读全文