• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
ArgenBarbie
博客园    首页    新随笔    联系   管理    订阅  订阅
2016年8月24日
84. Largest Rectangle in Histogram *HARD* -- 求柱状图中的最大矩形面积
摘要: 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 hist 阅读全文
posted @ 2016-08-24 18:27 ArgenBarbie 阅读(161) 评论(0) 推荐(0)
18. 4Sum -- 找到数组中和为target的4个数
摘要: Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array whic 阅读全文
posted @ 2016-08-24 17:51 ArgenBarbie 阅读(302) 评论(0) 推荐(0)
201. Bitwise AND of Numbers Range -- 连续整数按位与的和
摘要: Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. For example, given the range [5, 阅读全文
posted @ 2016-08-24 17:38 ArgenBarbie 阅读(182) 评论(0) 推荐(0)
368. Largest Divisible Subset -- 找出一个数组使得数组内的数能够两两整除
摘要: Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements in this subset satisfies: Si % Sj = 0 or 阅读全文
posted @ 2016-08-24 16:57 ArgenBarbie 阅读(292) 评论(0) 推荐(0)
198. 213. 337. House Robber -- 不取相邻值的最大值
摘要: 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 cons 阅读全文
posted @ 2016-08-24 13:35 ArgenBarbie 阅读(224) 评论(0) 推荐(0)
190. Reverse Bits -- 按位反转
摘要: Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), retur 阅读全文
posted @ 2016-08-24 10:02 ArgenBarbie 阅读(191) 评论(0) 推荐(0)
189. Rotate Array -- 将数组前一半移到后一半
摘要: Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. Not 阅读全文
posted @ 2016-08-24 09:51 ArgenBarbie 阅读(163) 评论(0) 推荐(0)
166. Fraction to Recurring Decimal -- 将除法的商表示成字符串(循环节用括号表示)
摘要: Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repeating 阅读全文
posted @ 2016-08-24 09:46 ArgenBarbie 阅读(194) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3