此主題將有三位參賽者共同參與,我們將合力完成三方共 90篇的鐵人文章(Java刷題A/B和C++刷題)。根據LeetCode Top 100 Liked題目集的脈絡,我們將介紹共十四種演算法,並透過Java和C++實作LeetCode上的題目。
原文題目Given an m x n 2D binary grid grid which represents a map of '1's (land) and...
原文題目There are a total of numCourses courses you have to take, labeled from 0 to ...
原文題目You are given an m x n grid where each cell can have one of three values:...
雜湊法(Hahing)是一種資料存取技術,通過將資料映射到一個特定的地址,實現快速的查找、插入和刪除操作。其核心原理是使用一個雜湊函數(Hash Functio...
原文題目 Given an array of strings strs, group the anagrams together. You can return...
原文題目Given an unsorted array of integers nums, return the length of the longest c...
原文題目Given an array of integers nums and an integer k, return the total number of...
鏈結串列(Linked Lists)是一種常見的資料結構,用來動態儲存元素。鏈結串列的元素是以節點的形式彼此連結,每個節點包含資料與指向下一個節點的指標。根據節...
環狀鏈結串列環狀鏈結串列和單向鏈結串列不同在於它最後一個節點會指向鏈結串列的第一個節點,形成一個環狀結構。這使得從任一節點都可以循環遍歷整個串列,並不存在指向...
原文題目Given the head of a linked list, remove the nth node from the end of the lis...