Skip to content

Instantly share code, notes, and snippets.

View dnavas77's full-sized avatar

dnavas77 dnavas77

View GitHub Profile
//DFS
public boolean hasPathDFS(int source, int destination) {
HashSet<Integer> visited = new HashSet<>();
return hasPathDFS(getNode(source), getNode(destination), visited);
}
private boolean hasPathDFS(Node source, Node destination, HashSet<Integer> visited) {
if (visited.contains(source.id)) {
return false;
}
package practice;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.util.HashMap;
import java.util.Map;
{
"workbench.startupEditor": "none",
"extensions.ignoreRecommendations": true,
"editor.fontSize": 15,
"editor.fontFamily": "Consolas",
// "editor.fontSize": 17,
// "editor.fontFamily": "Ubuntu Mono Regular",
"editor.lineHeight": 20,
"telemetry.enableCrashReporter": false,
"telemetry.enableTelemetry": false,
# Tell ls to be colourful
export CLICOLOR=1
export LSCOLORS=Exfxcxdxbxegedabagacad
# Tell grep to highlight matches
export GREP_OPTIONS='--color=auto'
export TERM="xterm-color"
PS1='\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;34m\]\w\[\e[0m\]\$ '
/*
* Set up your Git configuration
*/
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git config --global core.editor "nano"
" path: home\appdata\local\nvim\ginit.vim
filetype off
syntax off
if &compatible
set nocompatible
endif
" Add the dein installation directory into runtimepath
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim
@dnavas77
dnavas77 / init.ubuntu.vim
Last active January 21, 2018 23:21
Working settings for Neovim on Ubuntu
filetype off
syntax off
"~~~~~~~~~ Skip initialization for vim-tiny or vim-small.
if 0 | endif
if &compatible
set nocompatible
endif
# Path to your oh-my-zsh installation.
export ZSH=/Users/dnavas/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="avit"
plugins=(git)
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
"------------- Vundle and Plugins ------------
set nocompatible
filetype off
syntax off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'