今天是紀錄LeetCode解題的第二十二天 第二十二題題目:Given n pairs of parentheses, write a function to...
今天是紀錄LeetCode解題的第二十一天 第二十一題題目: 給定兩個已排序的鏈結串列list1和list2,合併兩個鏈結串列 解題思路 建立dummy節點當作...
今天是紀錄LeetCode解題的第二十天 第二十題題目:Given a string s containing just the characters ' (...
今天是紀錄LeetCode解題的第十九天 第十九題題目: 給定一個鏈結串列head,從鏈結串列末尾刪除Nth節點,並返回head 解題思路 想刪掉「倒數第 N...
今天是紀錄LeetCode解題的第十八天 第十八題題目:Given an array nums of n integers, return an array o...
今天是紀錄LeetCode解題的第十七天 第十七題題目:Given a string containing digits from 2-9 inclusive,...
今天是紀錄LeetCode解題的第十六天 第十六題題目:Given an integer array nums of length n and an integ...
今天是紀錄LeetCode解題的第十五天 第十五題題目:Given an integer array nums, return all the triplets...
今天是紀錄LeetCode解題的第十四天 第十四題題目:Write a function to find the longest common prefix s...
今天是紀錄LeetCode解題的第十三天 第十三題題目:Given a roman numeral, convert it to an integer.For...
今天是紀錄LeetCode解題的第十二天 第十二題題目:Given an integer, convert it to a Roman numeral.Roma...
今天是紀錄LeetCode解題的第十一天 第十一題題目:You are given an integer array height of length n. F...
今天是紀錄LeetCode解題的第九天是很簡單的一題題目 第九題題目:Given an integer x, return true if x is a pal...
今天是紀錄LeetCode解題的第八天 第八題題目:Implement the myAtoi(string s) function, which convert...
今天是紀錄LeetCode解題的第七天 第七題題目:Given a signed 32-bit integer x, return x with its dig...
今天是紀錄LeetCode解題的第十天來看前十題當中的第二題困難題 第十題題目:Given an input string s and a pattern p,...
今天是紀錄LeetCode解題的第六天 第六題題目:給一個字串假設是"PAYPALISHIRING",把它以Z字形排列輸出成"PA...
今天是紀錄LeetCode解題的第五天 第五題題目:Given a string s, return the longest palindromic subst...
今天是紀錄LeetCode解題的第四天來看一題困難題 第四題題目:Given two sorted arrays nums1 and nums2 of size...
今天是紀錄LeetCode解題的第三天 第三題題目:Given a string s, find the length of the longest subst...
今天是紀錄LeetCode解題的第二天 第二題題目:given two non-empty linked lists representing two non-...
說實話這題我搞超久的,主要就是卡在時間複雜度的問題,因為題目有規定時間複雜度要壓縮到O(log(m+n))一般的合併方法時間複雜度是 O(m+n),但這需要用二...
Given an unsorted integer array nums. Return the smallest positive integer that...
Winter is coming! During the contest, your first job is to design a standard he...
Given a sorted array of distinct integers and a target value, return the index...
You are given an array of k linked-lists lists, each linked-list is sorted in a...
You are given an integer array nums consisting of n elements, and an integer k....
Given the head of a linked list, return the node where the cycle begins. If the...
這一題其實以前就有寫過,只是當時還不知道Two Pointer的解題技巧,也是用迴圈粗暴解決,後來為了想要刻意練習使用Two Pointer技巧,又再重寫一次題...
有時Leetcode 沒考過,不是考生的問題: 是出題的人有問題。 ========= 以下以Leetcode 1656. Design an Ordered...