
LeetCode
文章平均质量分 84
BraveLii
这个作者很懒,什么都没留下…
展开
-
LeetCode 36. Valid Sudoku
Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:Each row must contain the digits 1-9 without repetition.Each column must contain t...原创 2018-04-28 15:10:03 · 355 阅读 · 0 评论 -
LeetCode 198. House Robber
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 you from robbing each of them is that adjacent house...原创 2018-04-28 12:53:12 · 181 阅读 · 0 评论 -
Leetcode 3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is "b", with the l...原创 2018-04-25 23:55:39 · 176 阅读 · 0 评论 -
LeetCode 35. Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.Exam...原创 2018-04-25 11:55:47 · 223 阅读 · 0 评论 -
84. Largest Rectangle in Histogram
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.Above is a histogram where width of each bar...原创 2018-04-24 14:15:32 · 185 阅读 · 0 评论 -
LeetCode-不重复的数字
1、不重复的数字(LeetCode-136)Given a non-empty array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you imple...原创 2018-04-21 14:39:59 · 1210 阅读 · 0 评论 -
LeetCode-11.最大容器问题
Given n non-negative integers a1, a2, ...,an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of linei is at (i, ai) and (i, 0). Find two li...原创 2018-04-20 17:05:09 · 403 阅读 · 0 评论