题目描述 Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) time and …
分类:LeetCode
[Leetcode] Unique Substrings in Wraparound String 循环字符串中的唯一子串
Unique Substrings in Wraparound String Consider the string s to be the infinite wraparound string of "abcdefgh…
LeetCode 2. Add Two Numbers
题目 You are given two non-empty linked lists representing two non-negative integers. The digits are stored in r…
LeetCode 1-3
写在前面 最近经常觉得自己越来越笨,一些很简单的问题愣是想不出来。今天去leetcode上做了几道题,面对上学时不止一次刷过的题目竟然有的连最笨的方法都想不出来。感觉还是要经常用用脑子,不然真的会生锈。。。 算法对我目前…
[Leetcode]10. 正则表达式匹配
题目描述: 给定一个字符串 (s) 和一个字符模式 (p)。实现支持 ‘.’ 和 ‘‘ 的正则表达式匹配。 ‘.’ 匹配任意单个字符。 ‘…
LeetCode:岛屿的个数
岛屿的个数 题目叙述: 给定一个由 ‘1’(陆地)和 ‘0’(水)组成的的二维网格,计算岛屿的数量。一个岛被水包围,并且它是通过水平方向或垂直方向上相邻的陆地连接而成的。你…
Leetcode 99. Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its struc…
[LeetCode By Go 16]136. Single Number
题目 Given an array of integers, every element appears twice except for one. Find that single one. Note: Your al…
105. Construct Binary Tree from Preorder and Inorder Traversal
欢迎fork and star:Nowcoder-Repository-github 105. Construct Binary Tree from Preorder and Inorder Traversal 题目 G…
[LeetCode] Can I Win 我能赢吗
In the “100 game,” two players take turns adding, to a running total, any integer from 1..1…
LeetCode 026 Remove Duplicates from Sorted Array
题目描述 Given a sorted array, remove the duplicates in place such that each element appear only once and return t…
199. Binary Tree Right Side View
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can…