← 💻 Coding & Engineering CraftNEXT IN CODING & ENGINEERING CRAFTGraphs: BFS, DFS, and Shortest Paths→
Core
Heaps and Priority Queues
A binary heap holds a partial order so you can pull the smallest or largest element in O(log n) and peek at it in O(1), without paying for a full sort. This is the right tool for top-k, merging k sorted streams, and a running median, cases where you want the extreme few, not the whole order. Applied-AI interviews test it because retrieval, ranking, and streaming pipelines all rest on cheap partial-order operations.
a free account unlocks the core curriculum tier · no card
RELATED CONCEPTS
PRACTICE THIS IN REAL QUESTIONS
LLM & GenAI FundamentalsExplain temperature, top-k, and top-p (nucleus) sampling. When do you use greedy vs sampling?→Coding & DSAGiven a query vector and N stored vectors, return the top-k most similar by cosine similarity, efficiently.→Coding & DSAReturn the k most frequent elements in a large array (and handle a stream).→Coding & DSAMerge k sorted lists (or streams) efficiently.→RAG & Agent System DesignContext precision versus context recall: which do you optimize, and how do they trade off in RAG?→Coding & DSADijkstra's algorithm: shortest paths from a source in a weighted graph.→
COMPANIES THAT ASSUME THIS
