Loading

摘要: You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once. 阅读全文
posted @ 2021-11-20 15:49 aalanwyr 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 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  阅读全文
posted @ 2021-11-20 15:02 aalanwyr 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2021-11-20 14:59 aalanwyr 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2021-11-20 14:56 aalanwyr 阅读(22) 评论(0) 推荐(0) 编辑
摘要: Given two integers left and right that represent the range [left, right], return the bitwise AND of all numbers in this range, inclusive. 范围内的数字按照位数与 阅读全文
posted @ 2021-11-20 14:51 aalanwyr 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2021-11-20 14:46 aalanwyr 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2021-11-20 14:43 aalanwyr 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2021-11-20 14:33 aalanwyr 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2021-11-20 14:15 aalanwyr 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 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] 阅读全文
posted @ 2021-11-20 14:08 aalanwyr 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2021-11-20 14:04 aalanwyr 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 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  阅读全文
posted @ 2021-11-20 13:57 aalanwyr 阅读(29) 评论(0) 推荐(0) 编辑