Print Matrix Diagonal Print the matrix in diagonal way. For example: 1 2 3 4 5 6 7 8 Print: 1 2 5 6 3 4 7 8 双重…
分类:LeetCode
LeetCode 350. Intersection of Two Arrays II
Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1] , nums2 =…
[剑指offer] JAVA版题解(全)
序号 题解 牛客 OJ 数据结构类型 03 [剑指offer] 二维数组中的查找 二维数组中的查找 数组 04 [剑指offer] 替换空格 替换空格 字符串 05 [剑指offer] 从尾到头打印链表 从尾到头打印链表…
43. 字符串相乘-leetcode大数相乘算法java实现
我的leetcode评论: https://leetcode-cn.com/problems/multiply-strings/comments/30927 我的github代码: https://github.com/…
二刷127. Word Ladder
Medium 卧槽,我真的强烈地感觉这道题是DFS呀,结果看答案都是BFS做的,趁机好好反省一下,最近的一次刷这道题仅仅是在一个月前,就连基本的处理方向都选错了。 我有句妈卖批不知当讲不当讲,这道题一直TLE搞了一个多小…
[LeetCode] Remove Element 移除元素
Given an array and a value, remove all instances of that value in place and return the new length. The …
[Leetcode] Word Break 单词分解
Word Break I Given a string s and a dictionary of words dict, determine if s can be segmented into a space-sep…
[Leetcode] Find Minimum in Rotated Sorted Array 找旋转有序数组的最小值
Find Minimum in Rotated Sorted Array I Suppose a sorted array is rotated at some pivot unknown to you beforeha…
LeetCode | Rotate List(循环右移链表)
Given a list, rotate the list to the right by k places, where k is non-negative. For examp…
[array] leetCode-26. Remove Duplicates from Sorted Array - Easy
26. Remove Duplicates from Sorted Array – Easy descrition Given a sorted array, remove the duplicates in…
Leetcode112.Path Sum
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the value…
[剑指offer] 连续子数组的最大和
本文首发于我的个人博客:尾尾部落 题目描述 HZ偶尔会拿些专业问题来忽悠那些非计算机专业的同学。今天测试组开完会后,他又发话了:在古老的一维模式识别中,常常需要计算连续子向量的最大和,当向量全为正数的时候,问题很好解决。…