08 2018 档案

摘要:Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. Th 阅读全文
posted @ 2018-08-31 08:37 轻风舞动 阅读(470) 评论(0) 推荐(0) 编辑
摘要:Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n] inclusive can be for 阅读全文
posted @ 2018-08-31 04:16 轻风舞动 阅读(465) 评论(0) 推荐(0) 编辑
摘要:Koko loves to eat bananas. There are N piles of bananas, the i-th pile has piles[i] bananas. The guards have gone and will come back in H hours. Koko 阅读全文
posted @ 2018-08-30 14:40 轻风舞动 阅读(679) 评论(0) 推荐(0) 编辑
摘要:Design and implement a data structure for Least Frequently Used (LFU) cache. It should support the following operations: get and put. get(key) - Get t 阅读全文
posted @ 2018-08-30 02:09 轻风舞动 阅读(522) 评论(0) 推荐(0) 编辑
摘要:Find the length of the longest substring T of a given string (consists of lowercase letters only) such that every character in T appears no less than  阅读全文
posted @ 2018-08-29 15:10 轻风舞动 阅读(1039) 评论(0) 推荐(0) 编辑
摘要:Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. 求两数相除,不能用乘法,除法和取余操作。 解法:位操作Bit Operati 阅读全文
posted @ 2018-08-29 05:25 轻风舞动 阅读(406) 评论(0) 推荐(0) 编辑
摘要:Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Example 2: Example 3: 给一个字符串按照字符出现的频率来排序。 Java: Python: P 阅读全文
posted @ 2018-08-29 04:56 轻风舞动 阅读(817) 评论(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 @ 2018-08-29 04:49 轻风舞动 阅读(1270) 评论(0) 推荐(0) 编辑
摘要:You want to build a house on an empty land which reaches all buildings in the shortest amount of distance. You can only move up, down, left and right. 阅读全文
posted @ 2018-08-29 04:20 轻风舞动 阅读(3296) 评论(0) 推荐(0) 编辑
摘要:The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Now your job is to find the total 阅读全文
posted @ 2018-08-29 03:45 轻风舞动 阅读(339) 评论(0) 推荐(0) 编辑
摘要:The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calcul 阅读全文
posted @ 2018-08-29 03:16 轻风舞动 阅读(342) 评论(0) 推荐(0) 编辑
摘要:A message containing letters from A-Z is being encoded to numbers using the following mapping way: Beyond that, now the encoded string can also contai 阅读全文
posted @ 2018-08-29 03:04 轻风舞动 阅读(644) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Note: 解法1: Br 阅读全文
posted @ 2018-08-28 09:33 轻风舞动 阅读(1323) 评论(1) 推荐(0) 编辑
摘要:Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are c 阅读全文
posted @ 2018-08-25 08:11 轻风舞动 阅读(561) 评论(0) 推荐(0) 编辑
摘要:Given n processes, each process has a unique PID (process id) and its PPID (parent process id). Each process only has one parent process, but may have 阅读全文
posted @ 2018-08-25 07:40 轻风舞动 阅读(1542) 评论(0) 推荐(0) 编辑
摘要:The Trips table holds all taxi trips. Each trip has a unique Id, while Client_Id and Driver_Id are both foreign keys to the Users_Id at the Users tabl 阅读全文
posted @ 2018-08-25 07:12 轻风舞动 阅读(584) 评论(0) 推荐(0) 编辑
摘要:Given an array of n integers nums and a target, find the number of index triplets i, j, k with 0 <= i < j < k < n that satisfy the condition nums[i] + 阅读全文
posted @ 2018-08-25 02:10 轻风舞动 阅读(746) 评论(0) 推荐(0) 编辑
摘要:Initially on a notepad only one character 'A' is present. You can perform two operations on this notepad for each step: Given a number n. You have to 阅读全文
posted @ 2018-08-22 08:54 轻风舞动 阅读(311) 评论(0) 推荐(0) 编辑
摘要:Imagine you have a special keyboard with the following keys: Key 1: (A): Print one 'A' on screen. Key 2: (Ctrl-A): Select the whole screen. Key 3: (Ct 阅读全文
posted @ 2018-08-22 08:47 轻风舞动 阅读(715) 评论(0) 推荐(0) 编辑
摘要:Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two 阅读全文
posted @ 2018-08-17 03:03 轻风舞动 阅读(972) 评论(2) 推荐(1) 编辑

点击右上角即可分享
微信分享提示