#programming
Read more stories on Hashnode
Articles with this tag
輪替列表 · 61. Rotate List 題目敘述 Given the head of a linked list, rotate the list to the right by k places. Example 1: Input: head = [1,2,3,4,5], k =...
插入排序循環連結序列 · 708. Insert into a Sorted Circular Linked List 題目敘述 Given a Circular Linked List node, which is sorted in ascending order, write a function...
找出最長的回文子字串 · 5. Longest Palindromic Substring 題目敘述 Given a string s, return the longest palindromic substring in s. Example 1: Input: s = "babad" Output:...
簡介 Intro 以下取自維基百科 Manacher 於 1975 年發現了一種線性時間演算法,可以在列出給定字串中從任意位置開始的所有回文子串。並且,Apostolico, Breslauer & Galil...
合併兩個排序序列 · 21. Merge Two Sorted Lists 題目敘述 You are given the heads of two sorted linked lists list1 and list2. Merge the two lists in a one sorted list....
回文連結序列 · 234. Palindrome Linked List 題目敘述 Given the head of a singly linked list, return true if it is a palindrome. Example 1: Input: head =...