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
/* | |
* Problem: Transaction in k | |
* List the days to buy and days to sell | |
* Complexity | |
* p = prices | |
* k = transactions | |
* | |
* O(p + k) | |
*/ | |
const daysToSell = (prices, k) => { |
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
Show hidden characters
{ | |
"presets": ["babel-preset-expo"], | |
"env": { | |
"development": { | |
"plugins": | |
["transform-react-jsx-source", | |
["module-resolver",{ | |
"root": ["./src"], | |
"alias": { | |
"screens": "./screens" |
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
const sortedReference = [ | |
'ITEM-1', | |
'ITEM-2', | |
'ITEM-3', | |
'ITEM-4', | |
'ITEM-5', | |
'ITEM-6', | |
'ITEM-7', | |
'ITEM-8', | |
'ITEM-9', |
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
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
tab-width 2 |
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
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory |
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
{ | |
"name": "nectarine", | |
"version": "0.1.0", | |
"private": true, | |
"devDependencies": { | |
"babel-eslint": "^8.0.1", | |
"jest-expo": "^21.0.2", | |
"react-native-scripts": "1.5.0", | |
"react-test-renderer": "16.0.0-alpha.12" | |
}, |
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
sdf |
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
// Place your key bindings in this file to override the defaults | |
[ | |
{ | |
"key": "ctrl+h", | |
"command": "workbench.action.navigateLeft" | |
}, | |
{ | |
"key": "ctrl+l", | |
"command": "workbench.action.navigateRight" | |
}, |
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
function bx | |
bundle exec $argv | |
end | |
alias fv "nvim (fzf)" | |
alias v "nvim" | |
alias vim "nvim" | |
alias gs "git status" | |
alias gtl "git log --graph --pretty=oneline --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all" | |
alias g "git" |
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
<script> | |
const digits = Array(10).fill(null); | |
const focusNext = i => { | |
const next = digits[i + 1]; | |
if (Boolean(next)) next.focus(); | |
}; | |
const focusPrevious = i => { | |
const next = digits[i - 1]; | |
if (Boolean(next)) next.focus(); |