- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/5798930 (
git reset
vsgit rm --cached
)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# <type>: <subject> (Max 50 char, Why is this change necessary?) | |
# |<---- Using a Maximum Of 50 Characters ---->| | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# Explain how the commit addresses the issue | |
# IMPORTANT!! Describe any side effects of the change. | |
# Provide links or keys to any relevant tickets, articles or other resources | |
# Examples: "Jira issue [ABC-123]" or "Closes Github issue #123" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//see if sequence of nums is in increasing order, but seq is allowed to decrease once. | |
// The Goldilocks solution | |
function checkSequence(arr) { | |
const maxOutOfSequencePermitted = 1 | |
let countOfOutOfSequence = 0 | |
for (let i = 1; i < arr.length; i += 1) { | |
if (arr[i] < arr[i - 1]) { | |
countOfOutOfSequence += 1 | |
} |