上一页 1 2 3 4 5 6 7 ··· 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-04-27 09:29 xuan_abc 阅读(176) 评论(0) 推荐(0)
摘要: Given a matrix of integers A with R rows and C columns, find the maximum score of a path starting at [0,0] and ending at [R-1,C-1]. The score of a pat 阅读全文
posted @ 2020-04-27 08:40 xuan_abc 阅读(234) 评论(0) 推荐(0)
摘要: A string S of lowercase letters is given. We want to partition this string into as many parts as possible so that each letter appears in at most one p 阅读全文
posted @ 2020-04-27 06:46 xuan_abc 阅读(150) 评论(0) 推荐(0)
摘要: We are given some website visits: the user with name username[i] visited the website website[i] at time timestamp[i]. A 3-sequence is a list of websit 阅读全文
posted @ 2020-04-27 06:03 xuan_abc 阅读(268) 评论(0) 推荐(0)
摘要: Given a string, remove all leading/trailing/duplicated empty spaces. Assumptions: The given string is not null. Examples: “ a” --> “a” “ I love MTV ” 阅读全文
posted @ 2020-04-26 10:04 xuan_abc 阅读(139) 评论(0) 推荐(0)
摘要: Reverse the words in a sentence. Assumptions Words are separated by single space There are no heading or tailing white spaces Examples “I love Google” 阅读全文
posted @ 2020-04-26 09:52 xuan_abc 阅读(159) 评论(0) 推荐(0)
摘要: Given a linked list, check whether it is a palindrome. Examples: Input: 1 -> 2 -> 3 -> 2 -> 1 -> null output: true. Input: 1 -> 2 -> 3 -> null output: 阅读全文
posted @ 2020-04-26 02:57 xuan_abc 阅读(84) 评论(0) 推荐(0)
摘要: Given a linked list and a target value T, partition it such that all nodes less than T are listed before the nodes larger than or equal to target valu 阅读全文
posted @ 2020-04-26 02:43 xuan_abc 阅读(90) 评论(0) 推荐(0)
摘要: Given a integer dictionary A of unknown size, where the numbers in the dictionary are sorted in ascending order, determine if a given target integer T 阅读全文
posted @ 2020-04-26 02:14 xuan_abc 阅读(116) 评论(0) 推荐(0)
摘要: You have some sticks with positive integer lengths. You can connect any two sticks of lengths X and Y into one stick by paying a cost of X + Y. You pe 阅读全文
posted @ 2020-04-16 10:52 xuan_abc 阅读(98) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 33 下一页