Tag: Search
4 posts
-
Elasticsearch in Practice: Mapping Design, Analyzers, Shard Sizing and Relevance Tuning
Elasticsearch mapping design, analyzer pitfalls, shard sizing trade-offs, and relevance tuning for production search.
-
C++ Search Algorithms: find, binary_search, lower_bound, and upper_bound
Choose between linear find and binary search on sorted ranges; use lower_bound, upper_bound, and equal_range for positions and equal-key runs in C++.
-
Binary Search: Lower/Upper Bound, Binary Search on the Answer, and Off-by-One Traps
Binary search beyond "find x in a sorted array": loop invariants that keep bounds correct, lower and upper bound, binary search on the answer, and the off-by-one and infinite-loop bugs that fail interviews.
-
BFS vs DFS: Choosing a Graph Traversal for Shortest Paths, Components and Cycles
BFS and DFS in Python for interviews: why BFS finds shortest paths, when to mark nodes visited, recursion limits, iterative DFS order bugs and grid patterns.