![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
金大大jhz
这个作者很懒,什么都没留下…
展开
-
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. Example 1: Input: [ [1,1,1], [1,0,1], [1,1,1] ] Output: [ [1,0,1], [0,0,0], [1,0,1] ] E...原创 2018-07-24 22:31:15 · 112 阅读 · 0 评论 -
leetcode-3SUM(三数相加等于0)
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: The solution set must not cont...原创 2018-07-15 17:15:20 · 1479 阅读 · 0 评论 -
leetcode-Product of Array Except Self
培训期间刷刷leetcode,描述如下: Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of numsexcept nums[i]. Example: Input...原创 2018-12-09 22:30:23 · 173 阅读 · 0 评论 -
面试题:从图的遍历到深拷贝的实现
前言 非常好的一道面试题,leetcode上是没有的,记录下。 原题 public class N{ public int val; public List<N> list; } val可以唯一标示一个对象,即不同对象的val值都不相同,给定如下类,要求实现深拷贝,方法定义如下: N dp(N source) { //待实现 } 分析 相信...原创 2019-06-13 23:40:23 · 511 阅读 · 0 评论