iT邦幫忙

鐵人檔案

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

C++刷題:LeetCode Top 100 Liked 系列

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

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

Day1 演算法介紹 : 二分搜尋法(Binary Search)

二元搜尋法(Binary Search),又稱作折半搜尋法、對數搜尋法,適用於有序陣列中搜尋目標元素的演算法,此演算法每進行一次比較將使搜尋範圍縮小一半。搜尋的...

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

Day2 Binary Search 題目1 : 33. Search in Rotated Sorted Array

Problem : There is an integer array nums sorted in ascending order (with distinc...

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

Day3 Binary Search 題目2 : 35. Search Insert Position

Problem : Given a sorted array of distinct integers and a target value, return t...

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

Day4 Binary Search 題目3:74. Search a 2D Matrix

Problem : You are given an m x n integer matrix matrix with the following two pr...

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

Day5 演算法介紹 : 二元樹(Binary Tree)

二元樹(Binary Tree),為各節點最多只有兩個子節點的樹結構,分別稱為左子節點和右子節點,左右子節點之間具有次序關係,左子節點在右子節點前,順序不可顛倒...

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

Day6 Binary Tree 題目1 : 98. Validate Binary Search Tree

Problem : Given the root of a binary tree, determine if it is a valid binary sea...

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

Day7 Binary Tree 題目2 : 102. Binary Tree Level Order Traversal

Problem : Given the root of a binary tree, return the level order traversal of i...

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

Day8 Binary Tree 題目3 : 199. Binary Tree Right Side View

Problem : Given the root of a binary tree, imagine yourself standing on the righ...

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

Day9 演算法介紹 : 堆疊(Stack)

堆疊(stack),將資料有序排成一列且具有 後進先出 LIFO(Last In First Out) 的資料結構,通常以一維陣列或鏈結串列的方式呈現,規則是...

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

Day10 Stack 題目1 : 20. Valid Parentheses

Problem : Given a string s containing just the characters '(', ')', '{', '}', '[...

2024-09-24 ‧ 由 bangyu1103 分享