• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






三心二意切切切

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理
1 2 下一页

2018年3月21日

122. Best Time to Buy and Sell Stock II
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2018-03-21 14:24 三心二意切切切 阅读(70) 评论(0) 推荐(0)
 

2018年3月20日

169. Majority Element
摘要: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the 阅读全文
posted @ 2018-03-20 20:45 三心二意切切切 阅读(75) 评论(0) 推荐(0)
 
717. 1-bit and 2-bit Characters
摘要: We have two special characters. The first character can be represented by one bit 0. The second character can be represented by two bits (10 or 11). N 阅读全文
posted @ 2018-03-20 20:15 三心二意切切切 阅读(105) 评论(0) 推荐(0)
 
448. Find All Numbers Disappeared in an Array
摘要: Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] 阅读全文
posted @ 2018-03-20 18:06 三心二意切切切 阅读(79) 评论(0) 推荐(0)
 
283. Move Zeroes
摘要: Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, giv 阅读全文
posted @ 2018-03-20 17:18 三心二意切切切 阅读(106) 评论(0) 推荐(0)
 
695. Max Area of Island
摘要: 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 @ 2018-03-20 16:23 三心二意切切切 阅读(140) 评论(0) 推荐(0)
 
485. Max Consecutive Ones
摘要: Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1] Output: 3 Explanation: The first two di 阅读全文
posted @ 2018-03-20 15:29 三心二意切切切 阅读(141) 评论(0) 推荐(0)
 

2018年3月19日

766. Toeplitz Matrix
摘要: A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element. Now given an M x N matrix, return True if and only if the m 阅读全文
posted @ 2018-03-19 19:55 三心二意切切切 阅读(108) 评论(0) 推荐(0)
 
566. Reshape the Matrix
摘要: In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data. 阅读全文
posted @ 2018-03-19 19:34 三心二意切切切 阅读(93) 评论(0) 推荐(0)
 
561. Array Partition I
摘要: Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of 阅读全文
posted @ 2018-03-19 18:28 三心二意切切切 阅读(90) 评论(0) 推荐(0)
 
1 2 下一页