BFS explores level by level using a queue — best for shortest path in unweighted graphs. DFS goes as deep as possible using a stack/recursion — useful for topological sort, cycle detection, and exploring all paths. Both are O(V+E).
Algorithms· asked at Generic✓ Added to review
An index is a data structure (often a B-tree) that speeds up reads by avoiding full table scans. Trade-off: it consumes storage and slows writes (inserts/updates must maintain the index), so index columns you frequently filter or join on.
Databases· asked at Generic✓ Added to review
`==` compares values after type coercion, so `0 == "0"` is true. `===` (strict equality) compares both value and type without coercion, so `0 === "0"` is false. Prefer `===` to avoid surprising coercion bugs.
JavaScript· asked at Generic✓ Added to review
`undefined` means a variable was declared but not assigned; `null` is an explicit 'no value' you assign intentionally. `typeof undefined` is 'undefined', `typeof null` is 'object' (a historical quirk).
JavaScript· asked at Generic✓ Added to review
A deadlock is when processes wait on each other indefinitely. It needs four conditions simultaneously (Coffman): mutual exclusion, hold-and-wait, no preemption, and circular wait. Breaking any one prevents deadlock.
Operating Systems· asked at Generic✓ Added to review
Lists are mutable (you can change, add, remove items) and use more memory; tuples are immutable and slightly faster, usable as dict keys. Use tuples for fixed collections and lists for changing sequences.
Python· asked at Generic✓ Added to review
Vertical scaling adds more power (CPU/RAM) to one machine — simple but capped and a single point of failure. Horizontal scaling adds more machines — more complex (load balancing, data partitioning) but elastic and fault-tolerant.
System Design· asked at Generic✓ Added to review
💬
Send Feedback / Bug
Feedback Submitted!
Thank you. Your help keeps Geeky Script running smoothly.