2018年1月5日

Set Matrix Zeroes

摘要: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. click to show follow up. Follow up: Did you use extra sp 阅读全文

posted @ 2018-01-05 20:28 夜的第八章 阅读(155) 评论(0) 推荐(0) 编辑

Remove Duplicates from Sorted Array II

摘要: Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For example,Given sorted array nums = [1,1,1,2,2,3], Your function sho 阅读全文

posted @ 2018-01-05 18:47 夜的第八章 阅读(106) 评论(0) 推荐(0) 编辑

spiral matrix II

摘要: Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example,Given n = 3, You should return the followi 阅读全文

posted @ 2018-01-05 16:02 夜的第八章 阅读(113) 评论(0) 推荐(0) 编辑

merge intervals(合并间隔)

摘要: 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 @ 2018-01-05 15:16 夜的第八章 阅读(212) 评论(0) 推荐(0) 编辑

导航