add flashcard generation tooling and binary search cards

- gen-flashcards.py: auto-generate recognition cards from all problem files
- toolkit/gen-problem-cards.org: 199 auto-generated problem cards
- 5 binary search tool cards (std::binary_search, std::lower_bound, comparison, two-sum pattern, sorting gotcha)
- two-sum.org: add binary search C++ attempt
- lc-org.el: add doom emacs localleader keybinding support
This commit is contained in:
2026-06-08 01:28:25 +08:00
parent c67841fe07
commit e10cc4257d
9 changed files with 2052 additions and 9 deletions
@@ -0,0 +1,14 @@
#+ANKI_DECK: study_deck_02
* std::lower_bound: find position of element :cpp:binary-search:algorithm:retrieval::recognition:
:PROPERTIES:
:END:
** Front
What does ~std::lower_bound~ return?
** Back
An iterator to the first element *>=* the given value. Returns ~end()~ if no such element exists.
#+begin_src cpp
auto it = std::lower_bound(vec.begin(), vec.end(), value);
#+end_src