上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 76 下一页
摘要: Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between nums[i] and 阅读全文
posted @ 2020-06-25 09:38 Schwifty 阅读(142) 评论(0) 推荐(0)
摘要: Given a matrix of M x N elements (M rows, N columns), return all elements of the matrix in diagonal order as shown in the below image. Example: Input: 阅读全文
posted @ 2020-06-25 00:15 Schwifty 阅读(96) 评论(0) 推荐(0)
摘要: You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1' 阅读全文
posted @ 2020-06-24 22:21 Schwifty 阅读(131) 评论(0) 推荐(0)
摘要: The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total num 阅读全文
posted @ 2020-06-24 09:39 Schwifty 阅读(142) 评论(0) 推荐(0)
摘要: Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Example 1: Input: [1,3,null,null,2 阅读全文
posted @ 2020-06-24 05:03 Schwifty 阅读(73) 评论(0) 推荐(0)
摘要: Given an n-ary tree, return the postorder traversal of its nodes' values. Nary-Tree input serialization is represented in their level order traversal, 阅读全文
posted @ 2020-06-23 22:12 Schwifty 阅读(127) 评论(0) 推荐(0)
摘要: Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of 阅读全文
posted @ 2020-06-23 13:17 Schwifty 阅读(156) 评论(0) 推荐(0)
摘要: Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. Note: The algorithm should run in linear time and in O(1) spa 阅读全文
posted @ 2020-06-21 09:36 Schwifty 阅读(146) 评论(0) 推荐(0)
摘要: Given a string s, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can f 阅读全文
posted @ 2020-06-21 09:07 Schwifty 阅读(181) 评论(0) 推荐(0)
摘要: Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repeating 阅读全文
posted @ 2020-06-21 08:11 Schwifty 阅读(164) 评论(0) 推荐(0)
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 76 下一页