iT邦幫忙

c++相關文章
共有 485 則文章

技術 [8/5] 2053. Kth Distinct String in an Array

EasyRelated Topics: Array / Hash Table / String / CountingLeetCode Source 解題想法...

技術 [8/4] 1508. Range Sum of Sorted Subarray Sums

MediumRelated Topics: Array / Two Pointers / Binary Search / SortingLeetCode So...

技術 [8/3] 1460. Make Two Arrays Equal by Reversing Subarrays

EasyRelated Topics: Array / Hash Table / SortingLeetCode Source 解題想法 基本上就是判斷說兩...

技術 [8/2] 2134. Minimum Swaps to Group All 1's Together II

MediumRelated Topics: Array / Sliding WindowLeetCode Source 解題想法 我們首先遍歷數組來計算1的...

技術 [8/1] 2678. Number of Senior Citizens

EasyRelated Topics: Array / StringLeetCode Source 解題想法 在 details 的陣列中,總長 15,計算...

技術 C++程式整合AutoCAD查詢dwg圖檔被開啟及鎖住狀態

本程式WhoLockDwg.exe整合在AutoCAD可查詢dwg圖檔被開啟及鎖住狀態。 程式約2007年以C++在BCB6完成,整合在AutoCAD工具列,可...

技術 C++ lambda test code

#include <algorithm> #include <iostream> #include <functional&gt...

技術 (C++)如何將指定時間日期轉換成UNIX時間&如何將UNIX時間轉換成日期

雖然稱不上多難,但是找可用的方法東拼西湊還是要花點時間,紀錄一下幫看到這篇的人省點時間需求:C++語言標準ISO C++20只使用STL庫,不需額外Librar...

技術 [LeetCode] 13. Roman to Integer

MediumRelated Topics: Hash Table / Math / StringLeetCode Source 解題想法 LeetCode...

技術 Leetcode 中文。你可能只花一分鐘寫完程式碼,但是比較困難在於閱讀英文題目。

歐氏定理: 「英文文法跟中文是相反的。」Return true if s is an acronym of words, and false otherwise...

技術 [LeetCode] 42. Trapping Rain Water

HardRelated Topics: Array / Two Pointers / Dynamic Programming / Stack / Monoto...

技術 [LeetCode] 135. Candy

HardRelated Topics: Array / GreedyLeetCode Source 解題想法 首先先確認 len(ratings),如果小於...

技術 [LeetCode] 134. Gas Station

MediumRelated Topics: Array / GreedyLeetCode Source 解題想法 這題是看之前解的方法 Python cl...

技術 [LeetCode] 238. Product of Array Except Self

MediumRelated Topics: Array / Prefix SumLeetCode Source 解題想法 這題我是看別人解法 原本以為要用...

技術 [LeetCode] 380. Insert Delete GetRandom O(1)

MediumRelated Topics: Array / Hash Table / Math / Design / RandomizedLeetCode S...

技術 [LeetCode] 274. H-Index

MediumRelated Topics: Array / Sorting / Counting SortLeetCode Source 解題想法 這題我卡...

技術 [LeetCode] 45. Jump Game II

MediumRelated Topics: Array / Dynamic Programming / GreedyLeetCode Source 解題想法...

技術 [LeetCode] 55. Jump Game

MediumRelated Topics: Array / Dynamic Programming / GreedyLeetCode Source 解題想法...

技術 [LeetCode] 122. Best Time to Buy and Sell Stock II

MediumRelated Topics: Array / Dynamic Programming / GreedyLeetCode Source 解題想法...

技術 [LeetCode] 121. Best Time to Buy and Sell Stock

EasyRelated Topics: Array / Dynamic ProgrammingLeetCode Source 解題想法 當下想到最直覺的解法...

技術 [LeetCode] 189. Rotate Array

MediumRelated Topics: Array / Math / Two PointersLeetCode Source 解題想法 這裡初始化 l...

技術 [LeetCode] 169. Majority Element

EasyRelated Topics: Array / Hash Table / Divide and Conquer / Sorting / Countin...

技術 [LeetCode] 80. Remove Duplicates from Sorted Array II

MediumRelated Topics: Array / Two PointersLeetCode Source 解題想法 這題跟昨天類似,但可重複的數字...

技術 [LeetCode] 26. Remove Duplicates from Sorted Array

EasyRelated Topics: Array / Two PointersLeetCode Source 解題想法 這題有 Hint 我有看一下 XD...

技術 [LeetCode] 27. Remove Element

EasyRelated Topics: Array / Two PointersLeetCode Source 解題想法 題目除了要回傳最後 nums 的長...

技術 [LeetCode] 88. Merge Sorted Array

EasyRelated Topics: Array / Two Pointers / SortingLeetCode Source 解題想法 題目要求要 i...

鐵人賽 自我挑戰組 DAY 30
Effective C++ 讀書筆記 系列 第 30

技術 [Day 30] Declare data members private

前言 不知不覺就第30天了~有始有終地來看看今天的守則吧!今天要介紹的是第22條守則~ 相對來說簡單明瞭好實踐,就抱著輕鬆的心情來看看背後的道理吧! 為什麼不要...

鐵人賽 自我挑戰組 DAY 29
Effective C++ 讀書筆記 系列 第 29

技術 [Day 29] Don't try to return a reference when you must return an object

前言 今天的守則接續昨天的內容,昨天提到的是盡量pass by reference,今天則是反過來提醒不要走火入魔該return object的時候也retur...

鐵人賽 自我挑戰組 DAY 28
Effective C++ 讀書筆記 系列 第 28

技術 [Day 28] Prefer pass-by-reference-to-const to pass-by-value (2)

前言 昨天介紹了盡量pass by reference by const這條守則,並說明它可以bypass掉昂貴的construct, destruct操作,也...

鐵人賽 自我挑戰組 DAY 27
Effective C++ 讀書筆記 系列 第 27

技術 [Day 27] Prefer pass-by-reference-to-const to pass-by-value (1)

前言 今天的守則是討論function中的parameter傳遞的方式,傳參數的時候可能沒想太多就直接把要用的東西傳入,今天就來看看其中可能更好的做法~ Pas...