程序媛詹妮弗
终身学习
摘要: Invert a binary tree. Example: Input: Output: code 阅读全文
posted @ 2019-05-16 07:59 程序媛詹妮弗 阅读(122) 评论(0) 推荐(0)
摘要: Given a non-negative integer c, your task is to decide whether there're two integers a and b such that a2 + b2 = c. Example 1: Example 2: 题意: 给定非负整数c, 阅读全文
posted @ 2019-05-16 07:40 程序媛詹妮弗 阅读(200) 评论(0) 推荐(0)
摘要: A group of two or more people wants to meet and minimize the total travel distance. You are given a 2D grid of values 0 or 1, where each 1 marks the h 阅读全文
posted @ 2019-05-16 07:33 程序媛詹妮弗 阅读(329) 评论(0) 推荐(0)
摘要: Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the numbe 阅读全文
posted @ 2019-05-16 07:23 程序媛詹妮弗 阅读(212) 评论(0) 推荐(0)
摘要: Given a linked list, return the node where the cycle begins. If there is no cycle, return null. To represent a cycle in the given linked list, we use 阅读全文
posted @ 2019-05-16 07:06 程序媛詹妮弗 阅读(162) 评论(0) 推荐(0)
摘要: You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element from th 阅读全文
posted @ 2019-05-16 06:58 程序媛詹妮弗 阅读(247) 评论(0) 推荐(0)
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). F 阅读全文
posted @ 2019-05-16 06:40 程序媛詹妮弗 阅读(156) 评论(0) 推荐(0)
摘要: Given two sequences pushed and popped with distinct values, return true if and only if this could have been the result of a sequence of push and pop o 阅读全文
posted @ 2019-05-16 06:09 程序媛詹妮弗 阅读(328) 评论(0) 推荐(0)
摘要: 如图 阅读全文
posted @ 2019-05-16 04:28 程序媛詹妮弗 阅读(260) 评论(0) 推荐(0)
摘要: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjac 阅读全文
posted @ 2019-05-16 03:59 程序媛詹妮弗 阅读(200) 评论(0) 推荐(0)
摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
posted @ 2019-05-16 03:51 程序媛詹妮弗 阅读(477) 评论(0) 推荐(0)
摘要: You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee 阅读全文
posted @ 2019-05-16 03:44 程序媛詹妮弗 阅读(190) 评论(0) 推荐(0)
摘要: There are G people in a gang, and a list of various crimes they could commit. The i-th crime generates a profit[i] and requires group[i] gang members 阅读全文
posted @ 2019-05-16 03:43 程序媛詹妮弗 阅读(284) 评论(0) 推荐(0)
摘要: 如题 阅读全文
posted @ 2019-05-16 03:36 程序媛詹妮弗 阅读(139) 评论(0) 推荐(0)
摘要: TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http 阅读全文
posted @ 2019-05-16 03:32 程序媛詹妮弗 阅读(301) 评论(0) 推荐(0)
摘要: Find the minimum length word from a given dictionary words, which has all the letters from the string licensePlate. Such a word is said to complete th 阅读全文
posted @ 2019-05-16 03:30 程序媛詹妮弗 阅读(170) 评论(0) 推荐(0)
摘要: Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Example 2: Example 3: 题意: 按频率将字母排序 Solution1: HashMap cod 阅读全文
posted @ 2019-05-16 03:26 程序媛詹妮弗 阅读(211) 评论(0) 推荐(0)
摘要: Design a HashMap without using any built-in hash table libraries. To be specific, your design should include these functions: put(key, value) : Insert 阅读全文
posted @ 2019-05-16 03:17 程序媛詹妮弗 阅读(432) 评论(0) 推荐(0)
摘要: Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target. 阅读全文
posted @ 2019-05-16 03:00 程序媛詹妮弗 阅读(172) 评论(0) 推荐(0)
摘要: Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) Yo 阅读全文
posted @ 2019-05-16 02:51 程序媛詹妮弗 阅读(221) 评论(0) 推荐(0)
摘要: Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord, such th 阅读全文
posted @ 2019-05-16 02:47 程序媛詹妮弗 阅读(228) 评论(0) 推荐(0)
摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov 阅读全文
posted @ 2019-05-16 02:45 程序媛詹妮弗 阅读(163) 评论(0) 推荐(0)
摘要: We are given two strings, A and B. A shift on A consists of taking string A and moving the leftmost character to the rightmost position. For example, 阅读全文
posted @ 2019-05-16 01:51 程序媛詹妮弗 阅读(231) 评论(0) 推荐(0)