• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
neverlandly
博客园    首页    新随笔    联系   管理    订阅  订阅
2015年3月14日
Lintcode: Maximum Subarray III
摘要: Given an array of integers and a number k, find k non-overlapping subarrays which have the largest sum.The number in each subarray should be contiguou... 阅读全文
posted @ 2015-03-14 10:53 neverlandly 阅读(466) 评论(0) 推荐(0)
Leetcode: Reverse Bits
摘要: Reverse Integer那道题会考虑溢出,因为那是reverse each digit,这里不会溢出,因为reverse的是each bit Q:如果该方法被大量调用,或者用于处理超大数据(Bulk data)时有什么优化方法?A:这其实才是这道题的精髓,考察的大规模数据时算法最基本的优化方法 阅读全文
posted @ 2015-03-14 07:06 neverlandly 阅读(775) 评论(0) 推荐(0)
Leetcode: Number of 1 Bits
摘要: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit i... 阅读全文
posted @ 2015-03-14 06:02 neverlandly 阅读(478) 评论(0) 推荐(0)
Lintcode: Maximum Subarray II
摘要: Given an array of integers, find two non-overlapping subarrays which have the largest sum.The number in each subarray should be contiguous.Return the ... 阅读全文
posted @ 2015-03-14 05:49 neverlandly 阅读(476) 评论(0) 推荐(0)
Lintcode: Maximum Subarray Difference
摘要: Given an array with integers.Find two non-overlapping subarrays A and B, which |SUM(A) - SUM(B)| is the largest.Return the largest difference.NoteThe ... 阅读全文
posted @ 2015-03-14 05:16 neverlandly 阅读(1206) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3