Given a sorted array nums, remove the duplicates in-place such that each element appear …
分类:LeetCode题目解答
[LeetCode] Palindrome Linked List 回文链表,Palindrome Number 验证回文数字,Validate Palindrome 验证回文字符串,Palindrome Partitioning 拆分回文串,Palindrome Partitioning II 拆分回文串之二
Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) time an…
[LeetCode] Search in a Sorted Array of Unknown Size 在未知大小的有序数组中搜索
Given an integer array sorted in ascending order, write a function to search target in&n…
LeetCode | Valid Number
题目: Validate if a given string is numeric. Some examples:"0" => true" 0.1 " => true"…
[LeetCode] Majority Element II 求众数之二,Majority Element 求众数,Majority Element 求众数
Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. The algorithm …
[LeetCode] Number of Lines To Write String 写字符串需要的行数
We are to write the letters of a given string S, from left to right into lines. Each line has maxi…
力扣(LeetCode)357
题目地址:https://leetcode-cn.com/probl…题目描述:给定一个非负整数 n,计算各位数字都不同的数字 x 的个数,其中 0 ≤ x < 10的n次方 。 示例: 输入: 2输出…
[LeetCode] Remove Nth Node From End of List 移除链表倒数第N个节点
Given a linked list, remove the nth node from the end of list and return its head. For example, Given l…
[LeetCode] Binary Tree Upside Down 二叉树的上下颠倒
Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that sh…
[LeetCode] Mini Parser 迷你解析器
Given a nested list of integers represented as a string, implement a parser to deserialize it. Each ele…
200. Number of Islands
Given a 2d grid map of ‘1’s (land) and ‘0’s (water), count the number of islands. An i…
[LeetCode] Palindrome Partitioning II 拆分回文串之二
Given a string s, partition s such that every substring of the partition is a palindrome. Return the mi…