上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 33 下一页
摘要: There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have prerequisites, for example to take course 0 you have to 阅读全文
posted @ 2020-02-03 12:45 xuan_abc 阅读(126) 评论(0) 推荐(0)
摘要: Design a Tic-tac-toe game that is played between two players on a nx n grid. You may assume the following rules: A move is guaranteed to be valid and 阅读全文
posted @ 2020-02-01 12:21 xuan_abc 阅读(153) 评论(0) 推荐(0)
摘要: Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longestpath betwee 阅读全文
posted @ 2020-02-01 07:30 xuan_abc 阅读(85) 评论(0) 推荐(0)
摘要: Given a string S, check if the letters can be rearranged so that two characters that are adjacent to each other are not the same. If possible, output 阅读全文
posted @ 2020-01-31 12:31 xuan_abc 阅读(166) 评论(0) 推荐(0)
摘要: Given a binary search tree and a node in it, find the in-order successor of that node in the BST. The successor of a node p is the node with the small 阅读全文
posted @ 2020-01-30 11:48 xuan_abc 阅读(150) 评论(0) 推荐(0)
摘要: Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target. Note: Given target value is a floati 阅读全文
posted @ 2020-01-30 11:17 xuan_abc 阅读(288) 评论(0) 推荐(0)
摘要: There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of the hor 阅读全文
posted @ 2020-01-27 06:38 xuan_abc 阅读(129) 评论(0) 推荐(0)
摘要: You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose o 阅读全文
posted @ 2020-01-20 00:10 xuan_abc 阅读(169) 评论(0) 推荐(0)
摘要: Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2,2] Example 2: Input: n 阅读全文
posted @ 2020-01-19 23:41 xuan_abc 阅读(100) 评论(0) 推荐(0)
摘要: Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2] Example 2: Input: num 阅读全文
posted @ 2020-01-19 23:40 xuan_abc 阅读(84) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 33 下一页