Skip to content

Instantly share code, notes, and snippets.

View alpharaoh's full-sized avatar
🔬
Working from home

Akaam Shamerany alpharaoh

🔬
Working from home
View GitHub Profile
@alpharaoh
alpharaoh / tmux.conf
Last active September 16, 2022 11:15
Tmux config
########################################################################
### Plugins
########################################################################
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'christoomey/vim-tmux-navigator'
# Themes
#set -g @plugin "alpharaoh/nord-tmux"
@alpharaoh
alpharaoh / init.vim
Created October 14, 2021 15:26
Neovim config
" Download nvim
" curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage; chmod u+x nvim.appimage; mv ./nvim.appimage /usr/local/bin/nvim
" Clone this file to ~/.config/nvim/init.vim
" After finishing config, run nvim +PlugInstall
call plug#begin("~/.vim/plugged")
" Plugin Section
Plug 'folke/tokyonight.nvim', { 'branch': 'main' }
Plug 'scrooloose/nerdtree'
# Time Complexity: O(N*W).
# As redundant calculations of states are avoided.
# Auxiliary Space: O(N*W).
# The use of 2D array data structure
#### Example
# 4 items
# football, W:5, V:10
# vase, W:10, V:40
############ Conclusion:
# Normal wins every time in speed; by more than 180s at 200,000,000 turns (intel i5 4570R running on a single thread)
# That being said, generator method can be more useful and scalable in some situations
############
from itertools import count
import time