• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
ArgenBarbie
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 29 下一页
2016年3月11日
60. Permutation Sequence
摘要: The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order,We get the following sequence 阅读全文
posted @ 2016-03-11 23:43 ArgenBarbie 阅读(126) 评论(0) 推荐(0)
58. Length of Last Word
摘要: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word 阅读全文
posted @ 2016-03-11 18:22 ArgenBarbie 阅读(133) 评论(0) 推荐(0)
56. Merge Intervals 57. Insert Interval *HARD*
摘要: 1. Merge Given a collection of intervals, merge all overlapping intervals. For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18]. / 阅读全文
posted @ 2016-03-11 17:37 ArgenBarbie 阅读(159) 评论(0) 推荐(0)
sort中的比较函数compare
摘要: sort中的比较函数compare要声明为静态成员函数或全局函数,不能作为普通成员函数,否则会报错: invalid use of non-static member function 因为:非静态成员函数是依赖于具体对象的,而std::sort这类函数是全局的,因此无法在sort中调用非静态成员函 阅读全文
posted @ 2016-03-11 17:36 ArgenBarbie 阅读(1694) 评论(0) 推荐(0)
54. 59. Spiral Matrix
摘要: 1. Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example,Given the following matrix: [ 阅读全文
posted @ 2016-03-11 15:59 ArgenBarbie 阅读(144) 评论(0) 推荐(0)
51. N-Queens 52. N-Queens II *HARD*
摘要: 1. 求所有解 The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, ret 阅读全文
posted @ 2016-03-11 15:28 ArgenBarbie 阅读(204) 评论(0) 推荐(0)
50. Pow(x, n)
摘要: Implement pow(x, n). double myPow(double x, int n) { unsigned int m = n; bool flag = false; double ans = 1; if(n < 0) { flag = true; m = -n; } while(m 阅读全文
posted @ 2016-03-11 11:39 ArgenBarbie 阅读(152) 评论(0) 推荐(0)
查看map中是否有某个关键字
摘要: map.find(keyword) == map.end() 阅读全文
posted @ 2016-03-11 11:02 ArgenBarbie 阅读(530) 评论(0) 推荐(0)
48. Rotate Image
摘要: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up:Could you do this in-place? void rotate( 阅读全文
posted @ 2016-03-11 10:54 ArgenBarbie 阅读(130) 评论(0) 推荐(0)
46. 47. Permutations
摘要: 求全排列。 1. 无重复元素 Given a collection of distinct numbers, return all possible permutations. For example,[1,2,3] have the following permutations:[1,2,3],  阅读全文
posted @ 2016-03-11 09:06 ArgenBarbie 阅读(153) 评论(0) 推荐(0)
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 29 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3