此主題將有三位參賽者共同參與,我們將合力完成三方共 90篇的鐵人文章(Java刷題A/B和C++刷題)。根據LeetCode Top 100 Liked題目集的脈絡,我們將介紹共十四種演算法,並透過Java和C++實作LeetCode上的題目。
原文題目Given a linked list, swap every two adjacent nodes and return its head. You...
原文題目Given head, the head of a linked list, determine if the linked list has a cy...
滑動視窗法(Sliding Window)是一種常用於處理子數列或子字串問題的技巧,主要用於解決連續數據結構的問題。其核心思想是使用一個固定或可變長度的視窗,不...
原文題目Given a string s, find the length of the longest substring without repeating...
原文題目Given two strings s and p, return an array of all the start indices of p's a...
雙重指標(Two Pointer)是一種高效的算法技巧,常用於解決涉及數組或鏈表的問題。其使用兩個指標遍歷數據結構,指標可以是固定或可變的,根據問題的不同而變化...