摘要:
You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once. 阅读全文
摘要:
Given an array of integers nums, half of the integers in nums are odd, and the other half are even. Sort the array so that whenever nums[i] is odd, i 阅读全文
摘要:
You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum ju 阅读全文
摘要:
You are given row x col grid representing a map where grid[i][j] = 1 represents land and grid[i][j] = 0 represents water. Grid cells are connected hor 阅读全文
摘要:
Given two integers left and right that represent the range [left, right], return the bitwise AND of all numbers in this range, inclusive. 范围内的数字按照位数与 阅读全文
摘要:
Given the root of a binary tree, return the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path betwee 阅读全文
摘要:
Given the root of a binary tree with unique values and the values of two different nodes of the tree x and y, return true if the nodes corresponding t 阅读全文
摘要:
Given an input string s, reverse the order of the words. A word is defined as a sequence of non-space characters. The words in s will be separated by 阅读全文
摘要:
Given a string s, sort it in decreasing order based on the frequency of the characters. The frequency of a character is the number of times it appears 阅读全文
摘要:
Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] 阅读全文
摘要:
Given a set of distinct positive integers nums, return the largest subset answer such that every pair (answer[i], answer[j]) of elements in this subse 阅读全文
摘要:
Given an array nums of n integers where nums[i] is in the range [1, n], return an array of all the integers in the range [1, n] that do not appear in 阅读全文