Open in app

Sign In

Write

Sign In

吳建興
吳建興

34 Followers

Home

About

Jan 25

Algorithms & Data Structures : summary

Hi! 在這裡希望整理出,面試前需要複習的清單。不然每一次寫完就忘記,沒有複習就去面試的話,就是等著被電爆而已 QQ,太苦了,實在是被電爆太多次了。假如我被裁員,又找不到下份工作的話,就太慘了。 這裡把我認為比較不會遇到的類別設為 "Optional",等想到再來弄了。 其中 Sort 的部分,有聽說會希望寫出組語,並想像有特殊硬體可加速的情況下,要怎 …

Algorithms

174 min read

Algorithms & Data Structures : summary
Algorithms & Data Structures : summary
Algorithms

174 min read


Nov 28, 2022

Algorithms & Data Structures : Linked-List Problems

Problem LeetCode : 146. LRU Cache [linked list] LeetCode 2326. Spiral Matrix IV [linked list] LeetCode 2487. Remove Nodes From Linked List [Linked-List] — — — — — LeetCode : 141. Linked List Cycle LeetCode : 2. Add Two Numbers LeetCode : 460. LFU Cache LeetCode : 146. LRU Cache 使用 doubly linked list 去記錄所有被丟進 hash…

Algorithms

3 min read

Algorithms

3 min read


Sep 22, 2022

Algorithms & Data Structures : Heap / Priority Queue / Binary Heap Problems

Problem LeetCode 215. Kth Largest Element in an Array [Priority Queue] LeetCode : 2410. Maximum Matching of Players With Trainers [Priority Queue] LeetCode : 2233. Maximum Product After K Increments [Priority Queue][Greedy] LeetCode : 2144. Minimum Cost of Buying Candies With Discount [Greedy][Sorting][Priority Queue] LeetCode : 2335. Minimum Amount of Time…

Algorithms

2 min read

Algorithms

2 min read


Sep 12, 2022

Algorithms & Data Structures : Union Find Problems

Problem LeetCode 200. Number of Islands LeetCode : 737. Sentence Similarity II [Union-Find][String][Hash Table][Depth-First Search] LeetCode 200. Number of Islands 這一題用 BFS 或是 DFS 可以很簡單的解出來,這邊試著用這題練習簡易的 Union Find。 一開始,只要遇到 1 就將 counter 加上 1 。之後只要 union 成功,counter 就 減 1 ,最後 counter 就是 island 個數。 class Solution { private: int X[4] = {0, 0, 1…

Algorithms

2 min read

Algorithms

2 min read


Sep 6, 2022

Algorithms & Data Structures : Queue Problems

Problem LeetCode 346. Moving Average from Data Stream LeetCode : 1429. First Unique Number [queue][hash table] LeetCode : 2073. Time Needed to Buy Tickets [queue][Array] — — — LeetCode 1696. Jump Game VI [monotonic queue] LeetCode 346. Moving Average from Data Stream class MovingAverage { public: /** Initialize your data structure here. */…

Algorithms

2 min read

Algorithms

2 min read


Sep 2, 2022

Algorithms & Data Structures : Stack Problems

Problem LeetCode : 1249. Minimum Remove to Make Valid Parentheses [string][stack] LeetCode : 726. Number of Atoms [string][stack] LeetCode : 439. Ternary Expression Parser [stack][string] LeetCode : 1944. Number of Visible People in a Queue [monotonic stack][hard …

Algorithms

7 min read

Algorithms

7 min read


Aug 25, 2022

Algorithms & Data Structures : Greedy Problems

Problems LeetCode : 991. Broken Calculator LeetCode : 1764. Form Array by Concatenating Subarrays of Another Array [array][greedy] LeetCode : 2086. Minimum Number of Buckets Required to Collect Rainwater from Houses [Greedy][String][Dynamic Programming] LeetCode : 1975. Maximum Matrix Sum [Greedy][Array][Matrix] LeetCode : 1054. Distant Barcodes [Greedy][Array][Sorting][Heap ( Priority Queue )] LeetCode…

Algorithms

6 min read

Algorithms

6 min read


Aug 2, 2022

Algorithms & Data Structures : Sorting Problems

Problem LeetCode 215. Kth Largest Element in an Array LeetCode 2279. Maximum Bags With Full Capacity of Rocks [sorting][greedy] LeetCode : 786. K-th Smallest Prime Fraction [sorting][binary search][priority queue] LeetCode : 2054. Two Best Non-Overlapping Events [Sorting][Ordered Map][Binary Search][Dynamic Programming][Priority Queue] LeetCode : 1984. Minimum Difference Between Highest and Lowest of…

3 min read

3 min read


Aug 2, 2022

Algorithms & Data Structures : Binary Search Problems

Problem LeetCode 528. Random Pick with Weight LeetCode : 1901. Find a Peak Element II [binary search][matrix] LeetCode : 2064. Minimized Maximum of Products Distributed to Any Store [binary search][array] LeetCode : 731. My Calendar II [binary search][red-black tree][segment tree] LeetCode : 2389. Longest Subsequence With Limited Sum [Binary Search][Sorting][Greedy][Prefix Sum][Array] …

Algorithms

3 min read

Algorithms

3 min read


Jul 27, 2022

Algorithms & Data Structures : Math Problems

Problems LeetCode : 372. Super Pow [快速冪取模] LeetCode : 843. Guess the Word [game theory] LeetCode : 2348. Number of Zero-Filled Subarrays [math][array] LeetCode : 2240. Number of Ways to Buy Pens and Pencils [math] LeetCode : 1954. Minimum Garden Perimeter to Collect Enough Apples [math] LeetCode : 2033. Minimum Operations…

Algorithms

11 min read

Algorithms

11 min read

吳建興

吳建興

34 Followers

I want to be a good programmer.(´・ω・`)

Following
  • NIC Lin

    NIC Lin

  • ChenNylon

    ChenNylon

  • 施典志 Tenz Shih

    施典志 Tenz Shih

  • 林罡北

    林罡北

  • Alexander Nguyen

    Alexander Nguyen

See all (48)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech