• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
yanqi
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2015年11月18日

LeetCode() Search in Rotated Sorted Array
摘要: 思路:先找到断点。估计还有更快的,不知道为什么,实在是不愿意去想这道题了class Solution {public: int search(vector& nums, int target) { int i,index=0; for(i=1;i=n... 阅读全文
posted @ 2015-11-18 14:54 yanqi 阅读(130) 评论(0) 推荐(0)
 
LeetCode() Search for a Range
摘要: class Solution {public: vector searchRange(vector& nums, int target) { vector res; vector xxx; xxx.push_back(-1); xxx.p... 阅读全文
posted @ 2015-11-18 13:46 yanqi 阅读(114) 评论(0) 推荐(0)
 
LeetCode() Search a 2D MatrixII
摘要: 一开始的超时思路int row=a.size(),col=a[0].size(); for(int i=0;i target && a[i][0] target) low = mid-1; else ... 阅读全文
posted @ 2015-11-18 10:40 yanqi 阅读(109) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3