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






struggleforit

 
 

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

2017年4月24日

Chapter two Binary Search(二分法)
摘要: 1.classical-binary-search(经典二分查找问题)【二分查找模板】 在一个排序数组中找一个数,返回该数出现的任意位置,如果不存在,返回-1 public class Solution { /** * @param nums: An integer array sorted in 阅读全文
posted @ 2017-04-24 13:47 struggleforit 阅读(330) 评论(0) 推荐(0)
 
Chapter one
摘要: 1.strstr(字符串查找) 对于一个给定的 source 字符串和一个 target 字符串,你应该在 source 字符串中找出 target 字符串出现的第一个位置(从0开始)。如果不存在,则返回 -1 class Solution { /** * Returns a index to th 阅读全文
posted @ 2017-04-24 13:06 struggleforit 阅读(208) 评论(0) 推荐(0)