Skip to content

Commit f09da39

Browse files
committed
added link to leetcode cookbook
1 parent d3c4a43 commit f09da39

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

interview/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* Aziz, [Elements of Programming Interviews](https://www.amazon.com/Elements-Programming-Interviews-Insiders-Guide/dp/1479274836): 300 Questions and Solutions by Aziz, Adnan, Prakash, Amit, Lee, Tsung-Hsien 1st (first) Edition (10/11/2012), 2012, 481 pages, 6 x 9, $25, 300 problems (mostly C++, concurrency in Java, discrete math in formulas and English)
2929
* Aziz, [Elements of Programming Interviews in Java: The Insiders' Guide](https://www.amazon.com/Elements-Programming-Interviews-Java-Insiders/dp/1517435803/): 2nd Edition (9/19/2015), 542 pages · ISBN 1517435803 $27, 250 Problems and solutions in Java
3030
* McDowell, [Cracking the Coding Interview](https://www.amazon.com/Cracking-Coding-Interview-Programming-Questions/dp/098478280X): 150 Programming Questions and Solutions, 2011 (5th edition), 500 pages, 6 x 9, $23, 150 problems, (mostly all Java except of course the C, C++ question sections!)
31+
* Halfrost/Dezhi Yu, [LeetCode Cookbook](https://halfrost.me/publication/leetcodecookbook/), 2021 | [Repo](https://github.com/halfrost/LeetCode-Go) | [Latest](https://github.com/halfrost/LeetCode-Go/releases/) | [Chinese version](https://books.halfrost.com/leetcode/)
3132
* Guiness, [Ace the Programming Interview](https://www.amazon.com/Ace-Programming-Interview-Questions-Answers/dp/111851856X): 160 Questions and Answers for Success, 2013, 419 pages, 6 x 9, $20, 160 problems, (mostly Java and C# but some unusual JavaScript, SQL, Ruby and Perl examples too)
3233
* Mongan, [Programming Interviews Exposed](https://www.amazon.com/Programming-Interviews-Exposed-Secrets-Landing/dp/1118261364): Secrets to Landing Your Next Job, 2013 (ed. 3), 301 pages, 7.4 x 9, $18, 150+ problems (C, C++, C#, Java)
3334

tools/bashrc.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ alias bashrc='source ~/.bash_profile; title ${PWD##*/};'
4747
alias brewery='brew update && brew upgrade && brew cleanup'
4848
alias bu='brew upgrade; brew update --debug --verbose'
4949
alias cdp='cd -P .'
50-
alias clean='find . -name \*.pyc -o -name .DS_Store -delete 2>/dev/null'
50+
alias clean='find . -name *.DS_Store -delete 2>/dev/null; find . -name Thumbs.db -delete 2>/dev/null'
5151
alias cls='clear && printf "\e[3J"'
52+
alias conv='iconv -f windows-1252 -t utf-8'
5253
alias dh='du -hs'
5354
alias dir='ls -al '
54-
alias dsclean='sudo find . -name *.DS_Store -type f -delete'
55+
alias dsclean='sudo find . -name Thumbs.db -delete -name *.DS_Store -type f -delete'
5556
alias dsf1='diskutil secureErase freespace 1'
5657
alias dswake='wakeonlan -i 192.168.1.218 00:11:32:aa:e3:5d'
5758
alias envi='env | grep -i '
@@ -674,13 +675,15 @@ function ydlo() {
674675
return
675676
fi
676677
678+
local _args_=""
677679
local _exec_=""
678680
local _href_=""
679681
local _name_=""
680682
local _sarg_=""
681683
local _earg_=""
682684
local _snum_=""
683685
local _enum_=""
686+
local _rvpl_=""
684687
# default sequence and extension for playlist
685688
local _extn_='-%(playlist_index)s.%(ext)s'
686689
local _ycmd_="${_tool_} -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4"
@@ -695,6 +698,8 @@ function ydlo() {
695698
if [[ $p -gt ${_snum_} ]]; then _enum_="$p";
696699
else
697700
_enum_=$((${_snum_} + $p - 1)); fi; fi
701+
elif [[ "$p" =~ ^[/-]{1,2}[rR] ]]; then
702+
_rvpl_="--playlist-reverse"
698703
else
699704
_name_="$p"
700705
fi
@@ -717,6 +722,9 @@ function ydlo() {
717722
_earg_="--playlist-end ${_enum_}"
718723
echo " end: ${_enum_}"
719724
fi
725+
if [[ ! "${_rvpl_}" == "" ]]; then
726+
_args_=$(echo "${_rvpl_} ${_args_}"|xargs)
727+
fi
720728
else # not from playlist, no need sequence
721729
_extn_='.%(ext)s'
722730
fi
@@ -732,7 +740,7 @@ function ydlo() {
732740
# download with name
733741
echo Downloading "${_name_}""${_extn_}" ...
734742
${_ycmd_} \
735-
${_sarg_} ${_earg_} \
743+
${_sarg_} ${_earg_} ${_args_} \
736744
-o "${_name_}""${_extn_}" \
737745
${_href_}
738746
}

0 commit comments

Comments
 (0)