虽然生活节奏很差,还在坚持一天至少一题(事实上每天都想多做几题,但发现往往只能保证一题,思考时间很长)。 这题让我想到word search,于是模仿word search写了一个dfs,但是数据多的时候会TLE。 BR…
369. Plus One Linked List
369- Plus One Linked List **Question Editorial Solution My Submissions Total Accepted: 1189 Total Submissions:…
300. Longest Increasing Subsequence
/* * 300. Longest Increasing Subsequence QuestionEditorial Solution My Submissions Total Accepted: 34958 Total…
168. Excel Sheet Column Title
168- Excel Sheet Column Title My Submissions Question Editorial Solution Total Accepted: 64257 Total Submissio…
Swift 删除链表的倒数第N个节点 - LeetCode
LeetCode 题目: 删除链表的倒数第N个节点 给定一个链表,删除链表的倒数第 n 个节点,并且返回链表的头结点。 示例: 给定一个链表: 1->2->3->4->5, 和 n = 2. 当删…
189. Rotate Array
/***189. Rotate Array Difficulty: Easy Rotate an array of n elements to the right by k steps. For example, wit…
186. Reverse Words in a String II
/* * 186. Reverse Words in a String II Total Accepted: 14384 Total Submissions: 49577 Difficulty: Medium Given…
140. Word Break II
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a …
350. Intersection of Two Arrays II
Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 =…
536. Construct Binary Tree from String
You need to construct a binary tree from a string consisting of parenthesis and integers. The whole input repr…
415. Add Strings
/* 415. Add Strings Total Accepted: 4917 Total Submissions: 11391 Difficulty: Easy Contributors: Admin Given t…
287. Find the Duplicate Number
**Description**Hints**Submissions**Solutions Total Accepted: 67370 Total Submissions: 157182 Difficulty: Mediu…