程序媛詹妮弗
终身学习
摘要: Implement int sqrt(int x). Compute and return the square root of x, where x is guaranteed to be a non-negative integer. Since the return type is an in 阅读全文
posted @ 2019-05-07 05:03 程序媛詹妮弗 阅读(225) 评论(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-05-07 04:58 程序媛詹妮弗 阅读(136) 评论(0) 推荐(0) 编辑
摘要: There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every 阅读全文
posted @ 2019-05-07 04:51 程序媛詹妮弗 阅读(131) 评论(0) 推荐(0) 编辑
摘要: In the "100 game," two players take turns adding, to a running total, any integer from 1..10. The player who first causes the running total to reach o 阅读全文
posted @ 2019-05-07 03:55 程序媛詹妮弗 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Shuffle a set of numbers without duplicates. Example: 题意: 洗牌 Solution1: code 阅读全文
posted @ 2019-05-07 03:52 程序媛詹妮弗 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tree [3 阅读全文
posted @ 2019-05-07 03:38 程序媛詹妮弗 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Given n nodes labeled from 0 to n-1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges make 阅读全文
posted @ 2019-05-07 03:14 程序媛詹妮弗 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Example 1: Example 2: Note: The length of S will be in the range [1, 1000]. Each character S[i] will be in the set {'a', 'b', 'c', 'd'}. 题意: 计数不同的回文子序 阅读全文
posted @ 2019-05-07 03:13 程序媛詹妮弗 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000. Example 1:Input: Output 阅读全文
posted @ 2019-05-07 03:10 程序媛詹妮弗 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums and a positive integer k, find whether it's possible to divide this array into k non-empty subsets whose sums are all 阅读全文
posted @ 2019-05-07 03:05 程序媛詹妮弗 阅读(126) 评论(0) 推荐(0) 编辑