INITIALIZING SECURE CHANNEL...
CPU MEM NET PING9.2 ms SECSECURED
COFFEE—WEB v4.0 // eu-1
ONLINE 2 847 --:--:--
/english > 16. Data Structures Vocabulary
// УРОК 16

Data Structures Vocabulary

B1

Data Structures Vocabulary

Common Data Structures

StructureKey PropertyUse Case Phrase
Array / ListO(1) access by index"Use an array when you need fast indexed access."
Hash Map / DictO(1) average lookup by key"I used a hash map to cache results and avoid recomputation."
StackLIFO — Last In, First Out"A stack is ideal for tracking nested function calls."
QueueFIFO — First In, First Out"We use a queue to process jobs in order."
TreeHierarchical structure"A binary search tree gives O(log n) lookups."
GraphNodes connected by edges"We model the social network as a directed graph."

Useful Phrases

  • "I chose a hash map for O(1) lookups instead of iterating the list."
  • "The problem had optimal substructure, so I used dynamic programming."
  • "Traversing the graph with BFS gives the shortest path in an unweighted graph."
// TERMINAL CHALLENGE

Проверь себя

Q1. Which data structure provides O(1) average lookup by key?
Q2. What does LIFO mean and which data structure uses it?
Q3. When would you use a Queue over a Stack?
Q4. Complete: 'I chose a hash map for O(1) ___ instead of iterating the entire list.'
Q5. For finding the shortest path in an unweighted graph, which algorithm do you use?
╔═ GL1TCH v0.1 ═[ПОДКЛЮЧЕНО]═╗ [×]
СОЕДИНЕНИЕ АКТИВНО
запросов:
// сессия #{} начата
>_
[ РАЗРЫВ СВЯЗИ ]
лимит исчерпан...
иду спать... zzZ
хочешь больше? [зарегистрироваться] // +10 запросов в день