240 发简信
IP属地:贵州
  • 主元素算法

    counting 大于 n/2, n/3都可以用投票法来做

  • 354. Russian Doll Envelopes

    354.Russian Doll Envelopes You have a number of envelopes with widths an...

  • longest increasing subsequence nlogn 算法

    O(n^2) 算法逻辑:贪心 + 二分搜索 数据定义补充:开一个栈,将a[0]入栈,每次取栈顶元素top和读到的元素ai做比较,如果a[i]> ...

  • 聊聊VIM

    说说vim。 曾经我也很怀疑这货能不能提高开发效率。 曾经也怀疑为什么要掌握vim。 漆黑的背景,字符光标不停地跳。 十指飞速,字符有规律的出现...

  • Some onsite algorithm questions

    Write a partition algorithm employed in qsort. Analyze time cost in bad,...

  • Leetcode 240 Search a 2D Matrix II

    典型老题,从右上角开始搜索,往下是增往左是减。比如.[[1 4],[2 5]]右上角元素即4 ir是行标,ic是列标假设target是2, ta...

  • LeetCode 202 Happy Number

    Write an algorithm to determine if a number is "happy".A happy number is...