📣 独立日限时特惠: VIP通行证立减$68
楼主: zeowantjob
跳转到指定楼层
上一主题 下一主题
收起左侧

leetcode 刷题日记

🔗
 楼主| zeowantjob 2018-7-1 14:03:12 | 只看该作者
全局:
//每行都是先0后1(比如00011111),输出0出现最早的那一行
        public int findrow (int[][]matrix) {
                if (matrix.length == 0 || matrix[0].length == 0) return 0;
                int m = matrix.length;
                int n = matrix[0].length;
                int res = 0;
                int i = m-1;
                int j = n-1;
                int pos = n;
                while (i >= 0 && j >= 0) {
                        while (j >= 0 && matrix[i][j]== 1) {
                                j--;
                        }
                        if (j < pos) {
                                pos = j;
                                res = i;
                        }
                        i--;
                }
                return res;
        }


18. 4Sum
454. 4Sum II
399. Evaluate Division
688. Knight Probability in Chessboard
270. Closest Binary Search Tree Value
272. Closest Binary Search Tree Value II
回复

使用道具 举报

🔗
 楼主| zeowantjob 2018-7-2 12:52:32 | 只看该作者
全局:
421. Maximum XOR of Two Numbers in an Array
729. My Calendar I
852. Peak Index in a Mountain Array

lint code 896. Prime Product
722. Maximum Subarray VI
898. Leftmost One
821. Time Intersection
1397. Digital Coverage
720. Rearrange a String With Integers
回复

使用道具 举报

🔗
 楼主| zeowantjob 2018-7-3 12:42:14 | 只看该作者
全局:
lintcode
560. Subarray Sum Equals K
818. Subset With Target
820. Rectangle
723. Rotate Bits - Left
1398. K Decimal Addition
744. Sum of first K even-length Palindrome numbers
620. Maximum Subarray IV
171. Anagrams


678. Valid Parenthesis String
32. Longest Valid Parentheses
38. Count and Say
回复

使用道具 举报

🔗
 楼主| zeowantjob 2018-7-4 14:00:10 | 只看该作者
全局:
525. Contiguous Array
767. Reorganize String
358. Rearrange String k Distance Apart
621. Task Scheduler               
二叉树变双链表,头尾相连返回头

merge two sorted interval lists
300. Longest Increasing Subsequence
354. Russian Doll Envelopes

Count a target number in a sorted array
多叉树所有最深节点的LCA
回复

使用道具 举报

🔗
hxthit 2018-7-20 02:36:55 | 只看该作者
全局:
啊,我为什么早不认识楼主啊,楼主好优秀!你是我的榜样!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表