Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->
自己写的一个一个字符匹配的while循环是什么辣鸡玩意,根本就过不了一些特殊测试集,哎,看官解吧。class Solution:def strStr(self, haystack, needle):&
You are given two linked lists representing two non-negative numbers. The digits are stored in rever
1.Given an array of integers, return indices of the two
这两道题若是不使用官方题解的双指针做法,就会涉及到浅复制,深复制的问题,可参考如下https://blog.csdn.net/qq_32907349/article/details/52190796
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct
32. Longest Valid ParenthesesGiven a string containing just the characters '(' and ')
54. Spiral MatrixGiven a matrix of m x n elements (m rows, n colu
53. Maximum SubarrayFind the contiguous subarray within an array (containing at least one number) wh
206. Reverse Linked ListReverse a singly linked list.反转链表:1)对于空链表或者一个节点链表无需反转,返回即可。设计思路:1)首先把当前节点外的剩