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:
@@ -71,22 +71,32 @@ Returns a plist (:problem :lang :input :code) or signals an error."
|
||||
(display-buffer (process-buffer proc)))))
|
||||
(display-buffer buf)))
|
||||
|
||||
(defvar lc-org-mode-map
|
||||
(let ((map (make-sparse-keymap))
|
||||
(prefix (make-sparse-keymap)))
|
||||
(defvar lc-org-mode-map (make-sparse-keymap)
|
||||
"Keymap for `lc-org-mode'.")
|
||||
|
||||
(when (and (boundp 'doom-version) (fboundp 'map!))
|
||||
(map! :map lc-org-mode-map
|
||||
:localleader
|
||||
:prefix "l"
|
||||
"s" #'lc-org-submit
|
||||
"r" #'lc-org-run
|
||||
"t" #'lc-org-status
|
||||
"p" #'lc-org-show-problem
|
||||
"d" #'lc-org-daily))
|
||||
|
||||
(unless (and (boundp 'doom-version) (fboundp 'map!))
|
||||
(let ((prefix (make-sparse-keymap)))
|
||||
(define-key prefix (kbd "s") #'lc-org-submit)
|
||||
(define-key prefix (kbd "r") #'lc-org-run)
|
||||
(define-key prefix (kbd "t") #'lc-org-status)
|
||||
(define-key prefix (kbd "p") #'lc-org-show-problem)
|
||||
(define-key prefix (kbd "d") #'lc-org-daily)
|
||||
(define-key map (kbd "C-c l") prefix)
|
||||
map)
|
||||
"Keymap for `lc-org-mode'.")
|
||||
(define-key lc-org-mode-map (kbd "C-c l") prefix)))
|
||||
|
||||
;;;###autoload
|
||||
(define-minor-mode lc-org-mode
|
||||
"Minor mode for LeetCode CLI integration in org source blocks.
|
||||
Keybindings under C-c l:
|
||||
Keybindings under localleader l (SPC m l or , l):
|
||||
s submit — submit current block
|
||||
r run — run with test input
|
||||
t status — check submission status
|
||||
|
||||
Reference in New Issue
Block a user