上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 76 下一页
摘要: Given two strings A and B of lowercase letters, return true if and only if we can swap two letters in A so that the result equals B. Example 1: Exampl 阅读全文
posted @ 2019-01-08 18:11 bernieloveslife 阅读(126) 评论(0) 推荐(0) 编辑
摘要: A game on an undirected graph is played by two players, Mouse and Cat, who alternate turns. The graph is given as follows: graph[a] is a list of all n 阅读全文
posted @ 2019-01-08 14:47 bernieloveslife 阅读(251) 评论(0) 推荐(0) 编辑
摘要: Given an array of characters, compress it in place. The length after compression must always be smaller than or equal to the original array. Every ele 阅读全文
posted @ 2019-01-07 21:42 bernieloveslife 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Sil 阅读全文
posted @ 2019-01-07 21:21 bernieloveslife 阅读(86) 评论(0) 推荐(0) 编辑
摘要: Some people will make friend requests. The list of their ages is given and ages[i] is the age of the ith person. Person A will NOT friend request pers 阅读全文
posted @ 2019-01-07 21:05 bernieloveslife 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such that the distance between i and j equals 阅读全文
posted @ 2019-01-07 19:43 bernieloveslife 阅读(103) 评论(0) 推荐(0) 编辑
摘要: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. Example 1: Example 2: 很蠢得用了模拟法。。 阅读全文
posted @ 2019-01-07 18:13 bernieloveslife 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Given a list of sorted characters letters containing only lowercase letters, and given a target letter target, find the smallest element in the list t 阅读全文
posted @ 2019-01-07 17:05 bernieloveslife 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Find the sum of all left leaves in a given binary tree. 阅读全文
posted @ 2019-01-07 16:58 bernieloveslife 阅读(117) 评论(0) 推荐(0) 编辑
摘要: You need to construct a string consists of parenthesis and integers from a binary tree with the preorder traversing way. The null node needs to be rep 阅读全文
posted @ 2019-01-07 16:28 bernieloveslife 阅读(119) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 76 下一页