上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 33 下一页
摘要: Find all pairs of elements in a given array that sum to the given target number. Return all the pairs of indices. Assumptions The given array is not n 阅读全文
posted @ 2020-03-04 07:42 xuan_abc 阅读(162) 评论(0) 推荐(0)
摘要: Design and implement a TwoSum class. It should support the following operations: add and find. add - Add the number to an internal data structure.find 阅读全文
posted @ 2020-03-04 05:27 xuan_abc 阅读(110) 评论(0) 推荐(0)
摘要: Given an array of balls, where the color of the balls can only be Red, Green or Blue, sort the balls such that all the Red balls are grouped on the le 阅读全文
posted @ 2020-03-04 00:59 xuan_abc 阅读(159) 评论(0) 推荐(0)
摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2020-03-01 12:06 xuan_abc 阅读(161) 评论(0) 推荐(0)
摘要: In a given grid, each cell can have one of three values: the value 0 representing an empty cell; the value 1 representing a fresh orange; the value 2  阅读全文
posted @ 2020-03-01 11:28 xuan_abc 阅读(205) 评论(0) 推荐(0)
摘要: We are given a binary tree (with root node root), a target node, and an integer value K. Return a list of the values of all nodes that have a distance 阅读全文
posted @ 2020-02-28 11:50 xuan_abc 阅读(143) 评论(0) 推荐(0)
摘要: Make a deep copy of an undirected graph, there could be cycles in the original graph. Assumptions The given graph is not null DFS /* * class GraphNode 阅读全文
posted @ 2020-02-26 11:52 xuan_abc 阅读(248) 评论(0) 推荐(0)
摘要: Each of the nodes in the linked list has another pointer pointing to a random node in the list or null. Make a deep copy of the original list. /** * c 阅读全文
posted @ 2020-02-26 11:40 xuan_abc 阅读(163) 评论(0) 推荐(0)
摘要: Given an unsorted integer array, remove adjacent duplicate elements repeatedly, from left to right. For each group of elements with the same value do 阅读全文
posted @ 2020-02-24 03:24 xuan_abc 阅读(236) 评论(0) 推荐(0)
摘要: Given a sorted integer array, remove duplicate elements. For each group of elements with the same value do not keep any of them. Do this in-place, usi 阅读全文
posted @ 2020-02-24 01:00 xuan_abc 阅读(191) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 33 下一页