程序媛詹妮弗
终身学习
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 30 下一页
摘要: Given an array w of positive integers, where w[i] describes the weight of index i, write a function pickIndex which randomly picks an index in proport 阅读全文
posted @ 2018-10-24 07:05 程序媛詹妮弗 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Design a data structure that supports all following operations in average O(1) time. Example: Solution1: HashMap + ArrayList 1. use an ArrayList toget 阅读全文
posted @ 2018-10-24 06:55 程序媛詹妮弗 阅读(161) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array of integers, find the length of longest increasing subsequence. Example: Input: [10,9,2,5,3,7,101,18] Output: 4 Explanation: T 阅读全文
posted @ 2018-10-24 06:49 程序媛詹妮弗 阅读(93) 评论(0) 推荐(0) 编辑
摘要: S and T are strings composed of lowercase letters. In S, no letter occurs more than once. S was sorted in some custom order previously. We want to per 阅读全文
posted @ 2018-10-24 06:45 程序媛詹妮弗 阅读(103) 评论(0) 推荐(0) 编辑
摘要: Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2 阅读全文
posted @ 2018-10-24 06:41 程序媛詹妮弗 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Given a nested list of integers, return the sum of all integers in the list weighted by their depth. Each element is either an integer, or a list -- w 阅读全文
posted @ 2018-10-22 08:49 程序媛詹妮弗 阅读(211) 评论(0) 推荐(0) 编辑
摘要: This is a follow up problem to Search in Rotated Sorted Array, where nums may contain duplicates. 思路 该题是[leetcode]33. Search in Rotated Sorted Array旋转 阅读全文
posted @ 2018-10-22 08:33 程序媛詹妮弗 阅读(116) 评论(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 @ 2018-10-22 08:01 程序媛詹妮弗 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also be integ 阅读全文
posted @ 2018-10-22 07:47 程序媛詹妮弗 阅读(221) 评论(0) 推荐(0) 编辑
摘要: You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contai 阅读全文
posted @ 2018-10-22 07:17 程序媛詹妮弗 阅读(113) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 30 下一页