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
# This is a solution to a blog post I just found at https://blog.svpino.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour | |
# I wrote it in Python because it shines for such challenges. | |
# It took me approximately 35 minutes (edit: added 5 minutes because of a bug in problem #4), so if I trust the internet, I'm definitely a Software Engineer. | |
# How cool is that? :-) | |
# Problem 1 | |
# --------- | |
# Write three functions that compute the sum of the numbers in a given list | |
# using a for-loop, a while-loop, and recursion. | |
def problem1_1(l): |
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
" My Configs | |
syntax on " Syntax highlighting | |
set nowrap " Do not wrap long lines | |
set autoindent " Indent at the same level of the previous line | |
set shiftwidth=4 " Use indents of 4 spaces | |
set expandtab " Tabs are spaces, not tabs | |
set tabstop=4 " An indentation every four columns | |
set softtabstop=4 " Let backspace delete indent | |
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J) |