Skip to content

Instantly share code, notes, and snippets.

1. Write a function to find the nth Fibonacci number

Fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, ...

# Python Solution

def find_nth_fib_num(n):
    # base case
    if n == 0:
@qingquan-li
qingquan-li / vimrc
Last active January 21, 2023 04:19
Vim configuration `~/.vimrc`
" Add numbers to each line on the left-hand side.
set number
" Turn syntax highlighting on.
syntax on
" Set the color scheme.
colorscheme darkblue
" Enable spell-checking.
set spell
" Show row and column ruler information.
set ruler
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}