added really good examples from HackerRank to several functions.