XpandNotes

exploring the intersection of technology and creativity

Leetcode #8 String to Integer (atoi)

Description Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer (similar to C/C++’s atoi function). The algorithm for myAtoi(string s) is as follows: R...

OS 筆記主頁

使用課本: Operating System Concepts 9th Edition 1 Introduction

OS Chapter 1

Introduction

目前普遍的電腦架構如下圖 CPU 不斷地從記憶體吞吐指令,根據指令操作各種 device,device 跳過 CPU,透過 DMA (Direct Memory Access) 主動向記憶體存取資料,增加電腦效率。CPU、記憶體、devices 互相協同工作下,形成了我們日常使用的電腦系統。 多處理器系統 (Multiprocessor systems, parallel syste...

資結筆記主頁

使用課本: Fundamentals of Data Structures in C 2/e 1 Basic Concepts

資結 Chapter 1

Basic Concepts

演算法 (Algorithm) 以有限的指令完成一個任務,一個演算法必須滿足以下五個條件: 輸入 (Input):演算法必須有 0 個或以上的輸入。 輸出 (Output):演算法應有 1 個或以上輸出。 明確性 (Definiteness):演算法的描述必須無歧義,以保證實際執行結果精確符合要求。 有限性 (Finitense):演算法必須在有限個步驟內完成任務。 ...

用 C++ 實作 Bloom Filter

Bloom Filter 在實作 key value storage 帶給我很大的效能優化,所以想特別做一份筆記紀錄,但是這個 bloom filter 是基於 jserv 老師在 dict 裡的實作,不是我原創的內容。 Bloom Filter 簡介 因為懶得自己措辭,所以以下簡介摘錄自 jserv 的上課教材 https://hackmd.io/@sysprog/2020-dict ...

計組筆記主頁

使用課本: Computer Organization And Design 5th Edition Ch1 Abstractions and Technology

計組 Chapter 1

Abstractions and Technology

Moore’s Law 每經過 18 至 24 個月,同等體積的晶片可以容納兩倍數數量的電晶體 (指數成長)。 8 個重要的想法 Design for Moore’s Law 由於晶片設計可能需要數年時間,每顆晶片的可用資源很容易在研發完成時翻倍,架構師必須預測當設計完成時,最先進的技術將在落哪裡,而不是固守剛開始設計時的技術程度。但近幾年摩爾定律遇到瓶頸,可能不那麼適用...

線代筆記主頁

使用課本: Linear Algebra with Applications 9th edition 1 Matrices and Systems of Equations 1.1 Systems of Linear Equations 1.2 Row Echelon Form

線代 Chapter 1.2

Row Echelon Form

若矩陣無法符合 strict triangular form,而是呈現倒梯形,並且每一列的首個非 0 項為 1,則稱 row echelon form (階梯形矩陣),如以下矩陣: \[\left[ \begin{array}{ccccc|c} 1 & 1 & 1 & 1 & 1 & 1 \\ 0 & 0 & 1 & 1 &a...