iT邦幫忙

鐵人檔案

2024 iThome 鐵人賽
回列表
佛心分享-刷題不只是刷題

Java刷題A:Leetcode Top 100 Liked 系列

此主題將有三位參賽者共同參與,我們將合力完成三方共 90篇的鐵人文章(Java刷題A/B和C++刷題)。根據LeetCode Top 100 Liked題目集的脈絡,我們將介紹共十四種演算法,並透過Java和C++實作LeetCode上的題目。

參賽天數 13 天 | 共 13 篇文章 | 1 人訂閱 訂閱系列文 RSS系列文 團隊鼠家沒有暑假
DAY 1

Day1 Backtracking回溯法 - 概念介紹

回溯法(Backtracking)是一種暴力搜尋法,主要通過逐一嘗試所有可能的解來解決問題,並增加中止條件判斷來提前排除不可行的解,也可說是一種優化版的枚舉法。...

2024-09-15 ‧ 由 mumu1201 分享
DAY 2

Day2 Backtracking回朔 - 題目1:39. Combination Sum

原文題目Given an array of distinct integers candidates and a target integer target,...

2024-09-16 ‧ 由 mumu1201 分享
DAY 3

Day3 Backtracking回朔 - 題目2:78. Subsets

原文題目Given an integer array nums of unique elements, return all possible subsets(...

2024-09-17 ‧ 由 mumu1201 分享
DAY 4

Day4 Backtracking回朔 - 題目3:79. Word Search

原文題目Given an m x n grid of characters board and a string word, return true if wo...

2024-09-18 ‧ 由 mumu1201 分享
DAY 5

Day5 Binary Tree二元樹 - 概念介紹

二元樹(Binary Tree)是一個常見且重要的樹狀結構,由有限節點組合而成的集合,此集合不是空集合,就是由樹根、左子樹和右子樹所組成,意思就是二元樹的分支度...

2024-09-19 ‧ 由 mumu1201 分享
DAY 6

Day6 Binary Tree二元樹 - 題目1:226. Invert Binary Tree

原文題目Given the root of a binary tree, invert the tree, and return its root. 題目摘要...

2024-09-20 ‧ 由 mumu1201 分享
DAY 7

Day7 Binary Tree二元樹 - 題目2:94. Binary Tree Inorder Traversal

原文題目Given the root of a binary tree, return the inorder traversal of its nodes'...

2024-09-21 ‧ 由 mumu1201 分享
DAY 8

Day8 Binary Tree二元樹 - 題目3:105. Construct Binary Tree from Preorder and Inorder Traversal

原文題目Given two integer arrays preorder and inorder where preorder is the preorder...

2024-09-22 ‧ 由 mumu1201 分享
DAY 9

Day9 Graph圖形 - 概念介紹(上)

圖形(Graph)是由所有頂點的集合 (V) 和所有邊的集合 (E) 所組合而成,通常以 G=(V, E) 來表示。 圖形結構分成以下兩種種類: 無向圖形無...

2024-09-23 ‧ 由 mumu1201 分享
DAY 10

Day10 Graph圖形 - 概念介紹(下)

圖形走訪圖形的走訪目的在於從某個頂點開始,根據不同的方法走訪完全部的頂點,透過圖形的走訪可以判斷圖形是否連通,並且可以得知連通的路徑,走訪的方法分為以下兩種:...

2024-09-24 ‧ 由 mumu1201 分享