• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
neverlandly
博客园    首页    新随笔    联系   管理    订阅  订阅
2016年1月20日
G面经prepare: Maximum Subsequence in Another String's Order
摘要: 求string str1中含有string str2 order的 subsequence 的最小长度DP做法:dp[i][j]定义为pattern对应到i位置,string对应到j位置时,shortest substring的长度,Int_Max表示不存在 1 package ShortestSu... 阅读全文
posted @ 2016-01-20 23:38 neverlandly 阅读(356) 评论(0) 推荐(0)
G面经prepare: Set Intersection && Set Difference
摘要: 求两个sorted数组的intersection e.g. [1,2,3,4,5],[2,4,6] 结果是[2,4]difference类似merge, 分小于等于大于三种情况,然后时间O(m+n), 空间O(1) 1 package ShortestSubsequenceIncluding; 2... 阅读全文
posted @ 2016-01-20 11:52 neverlandly 阅读(311) 评论(0) 推荐(0)
G面经prepare: Pattern Match
摘要: 设定一个pattern 把 'internationalization' 变成 'i18n', 比如word是house,pattern可以是h3e, 3se, 5, 1o1s1等,给pattern和word,判断是否match, 1 package DataStreamAverage; 2 3 ... 阅读全文
posted @ 2016-01-20 07:06 neverlandly 阅读(348) 评论(0) 推荐(0)
G面经prepare: Data Stream Average
摘要: 给一个datastream和一个fixed window size, 让我design一个class可以完成add number还有find average in the window. 就是不能用vector得用array. 当然用queue是最好的package DataStreamAverag... 阅读全文
posted @ 2016-01-20 01:12 neverlandly 阅读(369) 评论(0) 推荐(0)
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3