iT邦幫忙

鐵人檔案

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

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

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

鐵人鍊成 | 共 30 篇文章 | 1 人訂閱 訂閱系列文 RSS系列文 團隊鼠家沒有暑假
DAY 21

Day21 演算法介紹 : 矩陣(Matrix)

矩陣(Matrix),是由數字或其他類型的數據按行與列排列而成的的矩形數組,通常用 mXn 來表示,其中m是行數,n是列數,矩陣的元素通常用 a(i, j) 來...

2024-10-05 ‧ 由 bangyu1103 分享
DAY 22

Day22 Matrix 題目1:48. Rotate Image

Problem : You are given an n x n 2D matrix representing an image, rotate the ima...

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

Day23 Matrix 題目2:73. Set Matrix Zeroes

Problem : Given an m x n integer matrix matrix, if an element is 0, set its enti...

2024-10-07 ‧ 由 bangyu1103 分享
DAY 24

Day24 Matrix 題目3:240. Search a 2D Matrix II

Problem : Write an efficient algorithm that searches for a value target in an m...

2024-10-08 ‧ 由 bangyu1103 分享
DAY 25

Day25 演算法介紹:貪婪演算法(Greedy)

貪婪演算法(Greedy),是在每一步選擇中都選擇最佳的選項而希望導致結果為最好的演算法,這種演算法再解決有最佳子結構的問題時能得到良好的效率,與動態規劃不同的...

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

Day26 Greedy 題目1:55. Jump Game

Problem : You are given an integer array nums. You are initially positioned at t...

2024-10-10 ‧ 由 bangyu1103 分享
DAY 27

Day27 Greedy 題目2:45. Jump Game II

Problem : You are given a 0-indexed array of integers nums of length n. You are...

2024-10-11 ‧ 由 bangyu1103 分享
DAY 28

Day28 Greedy 題目3:121. Best Time to Buy and Sell Stock

Problem : You are given an array prices where prices[i] is the price of a given...

2024-10-12 ‧ 由 bangyu1103 分享
DAY 29

Day29 Misc 題目:53. Maximum Subarray

Problem : Given an integer array nums, find the subarray with the largest sum, a...

2024-10-13 ‧ 由 bangyu1103 分享
DAY 30

Day30 結論與心得

這次鐵人賽的題目我選擇leetcode刷題的原因是為了讓自己能更熟悉演算法的使用,根據LeetCode Top 100 Liked題目集的脈絡複習和學習新的演算...

2024-10-14 ‧ 由 bangyu1103 分享