For BFS with optimized way of not using Queue, please check this exercise example /leetcode/perfect_squares:
- it used the set replaces for the queue
- every time finishing one count, add the temp set to the original set increase count
- start the next count
duplicate line: SHIFT+ALT + ↓
assign variable to a selected code: CONTROL+SHIFT+R
refactor code: CONTROL+SHIFT+ r
delete line: CONTROL+SHIFT+ k
Folding:
Fold All (Ctrl+K Ctrl+0) folds all regions in the editor
Fold Level X (Ctrl+K Ctrl+2 for level 2)
Unfold All (Ctrl+K Ctrl+J) unfolds all regions in the editor
go back/forth to file: CONTROL+ALT+ ARROW_LEFT | ARROW_RIGHT
close all opened files: SHIFT+ALT+ x
git -c user.name='phamngoctan' -c user.email='[email protected]' commit -m "message"
git commit --author="phamngoctan <[email protected]>" -m "whatever"
Git amend
git commit --amend --author="phamngoctan <[email protected]>" --no-edit
Currently, max recursion depth in a problem of LC is around 2250.