Algorithm - hash map and set
import { YouTube } from 'astro-embed'; Set and Map 平常就有在用,map存的是Key-value pair、Set存的是unique value。而且操作上來說平均都是O(1)時間複雜度。這篇就來看看他們適合解哪些題型吧。
I'm a fullstack engineer, and Sandy a digital marketer.
import { YouTube } from 'astro-embed'; Set and Map 平常就有在用,map存的是Key-value pair、Set存的是unique value。而且操作上來說平均都是O(1)時間複雜度。這篇就來看看他們適合解哪些題型吧。
ByteByteGo這篇介紹的是一致性雜湊,一般來說會用到雜湊,目的是為了把流量透過固定的演算法,分散到某台機器上面,那什麼是一致性雜湊,不好的雜湊演算法又會有什麼問題呢?這篇筆記來說一下ByteByteGo怎麼介紹的。
這篇要介紹的是Rate Limiter,是ByteByteGo System design裡面第一個design環節。現在很多後端主流框架都有內建或有對應套件,但對應的演算法卻被封裝起來,知其然不知其所以然。 今天這篇靠AI生成點簡單的示意圖,讓一張圖道盡千言萬語。
import demo from './demo.mp4'; import triplet from './triplet.mp4'; import palindrome from './palindrome.mp4'; import largest_container from './largest_container.mp4'; import shift_zero from './shift_zero.mp4'; import next_permutation from './next_permutation.mp4'; 最近買了ByteByteGo裡的Lifetime Plan方案,才把Coding interview patterns裡的Two pointers algorithm跟System design interview裡的Design A Rate Limiter念完,就先用這篇來筆記一下Two pointers algorithm