├── .gitignore ├── .python-version ├── CONTRIBUTING.md ├── LICENSE.md ├── NOTICE ├── README.md ├── Unittesting.md ├── _bin ├── cpr └── test ├── challenge_0 ├── README.md ├── bash │ ├── deku-jacktraf │ │ ├── Readme.md │ │ └── hello-world.sh │ └── ning │ │ ├── README.md │ │ └── challenge_0.sh ├── c │ ├── almyk │ │ └── src │ │ │ └── helloworld.c │ ├── boilerup_brian │ │ ├── README.md │ │ └── helloWorld.c │ ├── jarydremillard │ │ └── hello_world.c │ ├── kmaitski │ │ └── hello_world.c │ ├── nasciiboy │ │ ├── Makefile │ │ ├── README.md │ │ └── src │ │ │ └── main.c │ ├── scottsquatch │ │ ├── Makefile │ │ ├── README.md │ │ └── src │ │ │ └── main.c │ ├── sysek │ │ ├── README.md │ │ └── main.c │ ├── tyleroar │ │ ├── README.md │ │ └── src │ │ │ └── hello_world.c │ ├── xor-eax-eax │ │ ├── README.md │ │ └── src │ │ │ └── challenge0.c │ └── zooks97 │ │ ├── README.md │ │ └── src │ │ └── helloWorld.c ├── coffeescript │ └── kedarbramhe │ │ ├── coffeescripts │ │ ├── hello_world.coffee │ │ └── readme.md │ │ └── javascripts │ │ └── hello_world.js ├── cpp │ ├── alexbotello │ │ └── main.cpp │ ├── battlefrog │ │ ├── main.cpp │ │ └── readme.md │ ├── blakebarnes00 │ │ ├── Makefile │ │ └── main.cpp │ ├── chowey │ │ ├── main.cpp │ │ └── readme.md │ ├── dewie102 │ │ ├── README.md │ │ └── src │ │ │ └── HelloWorld.cpp │ ├── flavabox │ │ └── main.cpp │ ├── manuel │ │ ├── README.md │ │ └── src │ │ │ └── solution.cpp │ ├── rbrt │ │ ├── README.md │ │ └── src │ │ │ └── [C++] Challenge0.cpp │ ├── spudmonkey │ │ └── main.cpp │ └── sven │ │ ├── README.md │ │ └── src │ │ └── HelloWorld.cpp ├── csharp │ ├── badoomtch │ │ └── helloworld.cs │ ├── bdoner │ │ ├── README.md │ │ └── hello.cs │ ├── fojo │ │ └── helloworld.cs │ ├── jfrancis2 │ │ ├── README.md │ │ └── src │ │ │ └── hello.cs │ ├── ross │ └── sven │ │ ├── README.md │ │ └── src │ │ └── HelloWorld.cs ├── elixir │ ├── csuzw │ │ ├── README.md │ │ └── src │ │ │ ├── .gitignore │ │ │ ├── lib │ │ │ └── hello.ex │ │ │ ├── mix.exs │ │ │ ├── mix.lock │ │ │ └── test │ │ │ ├── hello_test.exs │ │ │ └── test_helper.exs │ └── joegotflow83 │ │ └── main.ex ├── fsharp │ └── mssabr01 │ │ ├── README.md │ │ └── src │ │ └── HelloWorld.fs ├── go │ ├── erocs │ │ └── hello_world.go │ ├── makernaren │ │ ├── README.md │ │ └── helloworld.go │ ├── natdm │ │ └── app.go │ ├── shivams │ │ ├── README.md │ │ └── hello.go │ └── tml │ │ ├── README.md │ │ └── src │ │ └── helloworld.go ├── haskell │ └── halogenandtoast │ │ ├── README.md │ │ └── src │ │ └── Main.hs ├── java │ ├── JakeBash │ │ └── Challenge_0.java │ ├── Leigh │ │ └── HelloWorld.java │ ├── gwong │ │ └── challenge_0.java │ └── jdfurlan │ │ ├── README.md │ │ └── src │ │ └── HelloWorld.java ├── javascript │ ├── Zirhc86 │ │ ├── readme.md │ │ └── src │ │ │ ├── hello-world.js │ │ │ └── index.html │ ├── collinperkins │ │ ├── helloWorld.js │ │ ├── index.html │ │ └── readme.md │ ├── raijinn │ │ ├── README.md │ │ └── src │ │ │ └── challenge_0.js │ ├── rawphs │ │ ├── README.md │ │ └── src │ │ │ └── index.js │ ├── saif │ │ ├── README.md │ │ └── index.html │ └── ukirderohit │ │ ├── README.md │ │ ├── hello.js │ │ └── index.html ├── julia │ └── DTCitron │ │ ├── README.md │ │ └── src │ │ └── helloworld.jl ├── php │ └── selectivealso │ │ ├── hello_world.php │ │ └── readme.md ├── postscript │ └── moonpatroller │ │ └── hello_world.txt ├── python │ ├── Atakyn │ │ └── c0.py │ ├── CindyB │ │ ├── README.md │ │ └── src │ │ │ └── helloworld.py │ ├── DTCitron │ │ ├── README.md │ │ └── src │ │ │ └── main.py │ ├── DTaylor1986 │ │ ├── README.md │ │ └── src.py │ ├── Fejolu │ │ ├── readme.md │ │ └── src │ │ │ └── helloworld.py │ ├── Jac08H │ │ ├── README.md │ │ └── src │ │ │ └── hello_world.py │ ├── Loran425 │ │ ├── README.md │ │ └── src │ │ │ └── main.py │ ├── OkraArmband │ │ ├── README.md │ │ └── src │ │ │ └── hello_world.py │ ├── Tursup │ │ ├── Challenge #0.py │ │ └── README.MD │ ├── Zanetti │ │ └── challenge_0.py │ ├── Zjael │ │ ├── README.md │ │ └── src │ │ │ └── Python_0.py │ ├── abhiramm7 │ │ └── challenge_0.py │ ├── acronymcreations │ │ └── src │ │ │ └── hello.py │ ├── ajschrier │ │ ├── README.md │ │ └── challenge-0.py │ ├── alexmunoz905 │ │ ├── main.py │ │ └── readme.md │ ├── bryantpq │ │ ├── README.md │ │ └── hello.py │ ├── carter010 │ │ └── hello_world.py │ ├── dashsten │ │ └── hello.py │ ├── dfdx2 │ │ └── hello.py │ ├── dlutsch │ │ ├── README.md │ │ └── src │ │ │ └── hello_world.py │ ├── dsyost │ │ ├── README.md │ │ └── src │ │ │ └── helloworld.py │ ├── flickdm │ │ ├── Readme.md │ │ └── hello_world.py │ ├── gshooty │ │ └── hello_world.py │ ├── idlepythos │ │ └── helloWorld.py │ ├── jcpattison │ │ ├── README.md │ │ └── src │ │ │ └── HelloWord.py │ ├── kar-moore │ │ ├── README.md │ │ └── src │ │ │ └── hello_world.py │ ├── kokimame │ │ ├── README.md │ │ └── helloworld.py │ ├── lepmets │ │ ├── README.md │ │ └── src │ │ │ └── challenge_0.py │ ├── lex32pem │ │ ├── challenge_0.py │ │ └── readme.md │ ├── mindm │ │ ├── README.md │ │ └── src │ │ │ └── hello.py │ ├── mindovermiles262 │ │ ├── README.md │ │ └── src │ │ │ └── challenge_00.py │ ├── mjuiuc │ │ ├── README.md │ │ └── helloworld.py │ ├── nebi │ │ ├── README.md │ │ └── src │ │ │ └── hello.py │ ├── ning │ │ └── challenge_0.py │ ├── noirchrome │ │ └── helloworld.py │ ├── paper-squares │ │ └── helloworld.py │ ├── phil-harmoniq │ │ └── challenge_0.py │ ├── polar │ │ ├── README.md │ │ └── src │ │ │ └── helloWorld.py │ ├── popcorn_anachronism │ │ ├── challenge_0.py │ │ └── readme.md │ ├── psonghi │ │ ├── README.md │ │ └── src │ │ │ └── helloworld.py │ ├── returnlove │ │ ├── README.md │ │ └── src │ │ │ └── helloworld.py │ ├── sarcodian │ │ └── src │ │ │ └── challenge_0.py │ ├── shaowen │ │ └── helloworld.py │ ├── slandau │ │ ├── README.md │ │ └── hello_world.py │ ├── slansford │ │ ├── README.md │ │ └── src │ │ │ └── challenge_0.py │ ├── slickness │ │ ├── Challenge_0.py │ │ └── README.MD │ ├── sten │ ├── sysek │ │ ├── README.md │ │ └── src │ │ │ └── hello.py │ ├── system123 │ │ ├── README.md │ │ └── challenge0.py │ ├── tavery321 │ │ ├── README.md │ │ └── src │ │ │ └── c0.py │ ├── thereluctantloser │ │ ├── README.txt │ │ └── src │ │ │ └── challenge0.py │ ├── tvanderwal │ │ ├── README.md │ │ └── src │ │ │ └── challenge_0.py │ ├── ukirderohit │ │ └── helloworld.py │ ├── walkingluo │ │ ├── README.md │ │ └── src │ │ │ └── hello_world.py │ ├── whiterd │ │ ├── README.md │ │ └── src │ │ │ └── hello_world.py │ ├── wobboz │ │ ├── README.md │ │ └── src │ │ │ └── HelloWorld.py │ ├── wost │ │ ├── README.md │ │ └── main.py │ ├── zanetti │ │ └── challenge_0_pygame.py │ └── zooks97 │ │ ├── README.md │ │ └── src │ │ └── helloWorld.py ├── r │ └── aev1tas │ │ └── HelloWorld.R ├── ruby │ └── ConorWright │ │ ├── README.md │ │ └── hello_world.rb ├── rust │ ├── deg4uss3r │ │ └── challenge_0 │ │ │ ├── Cargo.lock │ │ │ ├── Cargo.toml │ │ │ ├── README.md │ │ │ ├── challenge_0 │ │ │ └── src │ │ │ └── main.rs │ ├── josephpd3 │ │ ├── .gitignore │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src │ │ │ └── main.rs │ ├── makernaren │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src │ │ │ └── main.rs │ └── myrrlyn │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src │ │ └── main.rs ├── scala │ └── ndsmith3 │ │ └── HelloWorld.scala ├── swift │ ├── garytate │ │ └── challenge_0.swift │ └── stevenr12 │ │ └── HelloWorld.swift └── x86 │ └── x95 │ ├── README.md │ └── src │ └── helloworld.s ├── challenge_1 ├── Julia │ └── DTCitron │ │ ├── README.md │ │ └── src │ │ └── reverse.jl ├── README.md ├── bash │ └── deku-jacktraf │ │ ├── Readme.md │ │ └── reverse-string.sh ├── c │ ├── almyk │ │ └── src │ │ │ └── challenge1.c │ ├── boilerup_brian │ │ ├── README.md │ │ └── src │ │ │ ├── stringreverse │ │ │ └── stringreverse.c │ ├── jrtn │ │ └── reverse_string.c │ ├── kmaitski │ │ └── reverse_string.c │ ├── nasciiboy │ │ ├── Makefile │ │ ├── README.md │ │ └── src │ │ │ └── main.c │ ├── scottsquatch │ │ ├── Makefile │ │ ├── README.md │ │ └── src │ │ │ └── main.c │ ├── tyleroar │ │ ├── README.md │ │ └── src │ │ │ └── strings.c │ ├── woser │ │ ├── README.md │ │ └── src │ │ │ └── string_reverse.c │ ├── xor-eax-eax │ │ ├── README.md │ │ └── src │ │ │ └── challenge1.c │ └── zooks97 │ │ ├── README.md │ │ └── src │ │ └── reverseInput.c ├── coffeescript │ └── kedarbramhe │ │ └── coffeescripts │ │ ├── readme.md │ │ └── reverse.coffee ├── cpp │ ├── alexbotello │ │ ├── README.md │ │ └── src │ │ │ └── main.cpp │ ├── blakebarnes00 │ │ ├── Makefile │ │ └── main.cpp │ ├── chowey │ │ ├── main.cpp │ │ └── readme.md │ ├── dewie102 │ │ ├── README.md │ │ └── src │ │ │ └── ReverseString.cpp │ ├── flickdm │ │ ├── Readme.md │ │ └── src │ │ │ └── main.cpp │ ├── manuel │ │ ├── Makefile │ │ ├── README.md │ │ └── src │ │ │ └── main.cpp │ ├── rbrt │ │ ├── README.md │ │ └── src │ │ │ └── [C++]Challenge1.cpp │ └── sven │ │ ├── README.md │ │ └── src │ │ └── Reverse.cpp ├── csharp │ ├── badoomtch │ │ └── reversestring.cs │ ├── bdoner │ │ ├── README.md │ │ └── esrever.cs │ ├── fojo │ │ └── Program.cs │ ├── jfrancis2 │ │ ├── README.md │ │ └── src │ │ │ └── program.cs │ ├── ross │ └── sven │ │ ├── README.md │ │ └── src │ │ └── Reverse.cs ├── elixir │ ├── csuzw │ │ ├── README.md │ │ └── src │ │ │ ├── .gitignore │ │ │ ├── lib │ │ │ └── reverse.ex │ │ │ ├── mix.exs │ │ │ ├── mix.lock │ │ │ └── test │ │ │ ├── reverse_test.exs │ │ │ └── test_helper.exs │ └── joegotflow83 │ │ └── reverse │ │ ├── .gitignore │ │ ├── README.md │ │ ├── config │ │ └── config.exs │ │ ├── lib │ │ └── reverse.ex │ │ ├── mix.exs │ │ └── test │ │ ├── reverse_test.exs │ │ └── test_helper.exs ├── go │ ├── erocs │ │ └── reverse.go │ ├── igniteflow │ │ ├── README.md │ │ └── src │ │ │ └── challenge_1.go │ ├── makernaren │ │ ├── README.md │ │ ├── string_reversal.go │ │ └── string_reversal_test.go │ ├── natdm │ │ ├── reverse.go │ │ └── reverse_test.go │ ├── rchicoli │ │ ├── reverse.go │ │ └── reverse_test.go │ ├── shivams │ │ ├── README.md │ │ └── reverse.go │ └── tml │ │ ├── README.md │ │ └── src │ │ └── strrev.go ├── haskell │ └── halogenandtoast │ │ ├── README.md │ │ └── src │ │ └── Main.hs ├── java │ ├── JakeBash │ │ └── Challenge_1.java │ ├── Leigh │ │ └── ReverseString.java │ ├── eddy_north │ │ └── ReverseString.java │ ├── jdfurlan │ │ ├── README.md │ │ └── src │ │ │ └── ReverseAString.java │ ├── togden │ │ ├── README.md │ │ └── src │ │ │ └── Reversal.java │ └── zmiller91 │ │ └── ReverseString.java ├── javascript │ ├── Zirhc86 │ │ ├── readme.md │ │ └── src │ │ │ ├── index.html │ │ │ └── stringReverse.js │ ├── collinperkins │ │ ├── index.html │ │ ├── readme.md │ │ └── reverse.js │ ├── raijinn │ │ ├── README.md │ │ └── src │ │ │ └── challenge_1.js │ └── rawphs │ │ ├── README.md │ │ └── src │ │ └── index.js ├── php │ ├── jarydremillard │ │ └── challenge_1.php │ └── selectivealso │ │ ├── readme.md │ │ ├── string_reversal.php │ │ └── string_reversal_short.php ├── postscript │ └── moonpatroller │ │ └── reverse_string.txt ├── python │ ├── Atakyn │ │ └── c1.py │ ├── CindyB │ │ ├── README.md │ │ └── src │ │ │ ├── reverse_string.py │ │ │ └── reverse_string_test.py │ ├── DTCitron │ │ ├── README.md │ │ └── src │ │ │ └── main.py │ ├── DakRomo │ │ └── Challenge_1 │ ├── Jac08H │ │ ├── README.md │ │ └── src │ │ │ └── solution.py │ ├── Loran425 │ │ ├── README.md │ │ └── src │ │ │ └── main.py │ ├── MicalV │ │ └── main.py │ ├── OkraArmband │ │ ├── README.md │ │ └── src │ │ │ └── reverse.py │ ├── abhiramm7 │ │ └── challenge_1.py │ ├── acronymcreations │ │ └── src │ │ │ └── challenge1.py │ ├── ajschrier │ │ ├── README.md │ │ └── challenge_1.py │ ├── alexbotello │ │ ├── README.md │ │ └── main.py │ ├── alexmunoz905 │ │ ├── main.py │ │ └── readme.md │ ├── boilerup_brian │ │ ├── README.md │ │ └── src │ │ │ └── stringreverse.py │ ├── bryantpq │ │ ├── README.md │ │ └── reverse.py │ ├── carter010 │ │ └── reverse.py │ ├── dashsten │ │ └── challenge_1.py │ ├── dfdx2 │ │ └── reverse.py │ ├── dlutsch │ │ └── reverse_string.py │ ├── dsyost │ │ ├── README.md │ │ └── src │ │ │ └── reverse.py │ ├── gshooty │ │ └── reverse.py │ ├── gwong │ │ └── challenge_1.py │ ├── hkl0902 │ │ └── challenge_1.py │ ├── igniteflow │ │ ├── README.md │ │ └── src │ │ │ └── challenge_1.py │ ├── jarydremillard │ │ └── reverse.py │ ├── jcpattison │ │ ├── README.md │ │ └── src │ │ │ └── reverse.py │ ├── kar-moore │ │ ├── README.md │ │ └── src │ │ │ └── challenge1.py │ ├── kokimame │ │ ├── README.md │ │ └── reverse_string.py │ ├── lepmets │ │ ├── README.md │ │ └── src │ │ │ └── challenge_1.py │ ├── lex32pem │ │ ├── challenge_1.py │ │ └── readme.md │ ├── manuel │ │ └── solution.py │ ├── mindm │ │ ├── README.md │ │ └── src │ │ │ └── reverse.py │ ├── mjuiuc │ │ └── ReverseString.py │ ├── nebi │ │ ├── README.md │ │ └── src │ │ │ └── reverse.py │ ├── ning │ │ └── challenge_1.py │ ├── papersquares │ │ └── stringreversechallenge1.py │ ├── phil-harmoniq │ │ └── challenge_1.py │ ├── polar │ │ ├── README.md │ │ └── src │ │ │ └── reverse.py │ ├── popcorn_anachronism │ │ ├── challenge_1.py │ │ └── readme.md │ ├── psonghi │ │ ├── README.md │ │ └── src │ │ │ └── reverse_string.py │ ├── py2k5 │ │ └── reverseString.py │ ├── returnlove │ │ ├── README.md │ │ └── src │ │ │ └── reverse_a_string.py │ ├── sarcodian │ │ ├── README.md │ │ └── src │ │ │ └── challenge_1.py │ ├── shaowen │ │ └── reverse.py │ ├── slandau │ │ ├── README.md │ │ └── reverse.py │ ├── slansford │ │ ├── README.md │ │ └── src │ │ │ └── challenge_1.py │ ├── slickness │ │ ├── README.MD │ │ └── challenge_1.py │ ├── sysek │ │ ├── README.md │ │ └── src │ │ │ └── reverse.py │ ├── system123 │ │ ├── README.md │ │ └── challenge1.py │ ├── tavery321 │ │ ├── README.md │ │ └── src │ │ │ └── c1.py │ ├── tursup │ │ ├── READMEE.MD │ │ └── challenge1.py │ ├── tvanderwal │ │ ├── README.md │ │ └── src │ │ │ └── challenge_1.py │ ├── ukirderohit │ │ └── reverse.py │ ├── walkingluo │ │ ├── README.md │ │ └── src │ │ │ └── reverse_string.py │ ├── whiterd │ │ ├── README.md │ │ └── src │ │ │ └── reverse_me.py │ ├── wobboz │ │ ├── README.md │ │ └── src │ │ │ └── reverse.py │ ├── wost │ │ └── main.py │ ├── zanetti │ │ └── challenge_0.py │ └── zooks97 │ │ ├── README.md │ │ ├── reverseInput.py │ │ └── src │ │ └── reverseInput.py ├── r │ ├── aev1tas │ │ └── ReverseString.R │ └── henriquefb │ │ ├── README.md │ │ └── challenge_1.R ├── ruby │ └── ConorWright │ │ ├── README.md │ │ └── string_reverse.rb ├── rust │ ├── .gitignore │ ├── deg4uss3r │ │ └── challenge_1 │ │ │ ├── Cargo.lock │ │ │ ├── Cargo.toml │ │ │ ├── README.md │ │ │ ├── src │ │ │ └── lib.rs │ │ │ └── tests │ │ │ └── main.rs │ ├── josephpd3 │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── src │ │ │ └── lib.rs │ │ └── tests │ │ │ └── josephpd3.rs │ ├── makernaren │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src │ │ │ ├── main.rs │ │ │ └── string_reverser.rs │ └── myrrlyn │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src │ │ └── main.rs ├── scala │ └── ndsmith3 │ │ ├── README.md │ │ └── StringReverse.scala ├── swift │ ├── garytate │ │ └── challenge_1.swift │ └── stevenr12 │ │ ├── README.md │ │ └── reverse.swift ├── testfiles │ ├── o1 │ ├── o2 │ ├── o3 │ ├── o4 │ ├── o5 │ ├── t1 │ ├── t2 │ ├── t3 │ ├── t4 │ └── t5 └── x86 │ └── x95 │ ├── README.md │ └── src │ └── reversestring.s ├── challenge_10 ├── README.md ├── java │ └── zmiller91 │ │ ├── README.md │ │ ├── ValidClosers.java │ │ └── YOP.java ├── python │ ├── alexbotello │ │ ├── README.md │ │ └── src │ │ │ ├── closers.py │ │ │ └── tests.py │ ├── loran425 │ │ ├── README.md │ │ └── src │ │ │ ├── matching_brackets.py │ │ │ └── tests.py │ ├── ning │ │ ├── README.md │ │ ├── challenge_10.py │ │ └── test.py │ ├── sarcodian │ │ ├── READ.me │ │ └── src │ │ │ ├── challenge_10.py │ │ │ └── challenge_10_tests.py │ ├── shaowen │ │ ├── READE.md │ │ ├── solution.py │ │ └── unit_test.py │ ├── slandau3 │ │ ├── closers.py │ │ └── tests.py │ └── system123 │ │ ├── challenge_10.py │ │ └── tests.py ├── rust │ └── deg4uss3r │ │ ├── README.md │ │ └── challenge_10 │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── src │ │ └── main.rs │ │ └── tests │ │ └── test.bsh ├── testfiles │ ├── o1 │ ├── o2 │ ├── o3 │ ├── o4 │ ├── o5 │ ├── o6 │ ├── o7 │ ├── o8 │ ├── o9 │ ├── t1 │ ├── t2 │ ├── t3 │ ├── t4 │ ├── t5 │ ├── t6 │ ├── t7 │ ├── t8 │ └── t9 └── x86 │ └── x95 │ ├── README.md │ └── src │ ├── brackets.s │ └── challenge10.c ├── challenge_11 ├── README.md ├── cpp │ └── manuel │ │ ├── Makefile │ │ ├── README.md │ │ └── src │ │ ├── BST.cpp │ │ ├── include │ │ └── BST.h │ │ └── main.cpp ├── python │ ├── mindm │ │ ├── README.md │ │ └── src │ │ │ ├── btree.py │ │ │ └── remove_from_tree.py │ ├── slandau3 │ │ └── bst.py │ └── system123 │ │ └── challenge_11.py └── testfiles │ ├── o1 │ ├── o2 │ ├── o3 │ ├── o4 │ ├── t1 │ ├── t2 │ ├── t3 │ └── t4 ├── challenge_12 ├── README.md ├── python │ ├── sarcodian │ │ ├── READ.me │ │ └── src │ │ │ ├── challenge_12.py │ │ │ └── challenge_12_tests.py │ ├── slandau3 │ │ ├── .vscode │ │ │ └── settings.json │ │ ├── compression.py │ │ └── tests.py │ └── system123 │ │ └── challenge_12.py └── rust │ └── deg4uss3r │ └── challenge_12 │ ├── Cargo.toml │ └── src │ └── lib.rs ├── challenge_13 ├── README.md ├── c │ └── karanchawla │ │ ├── README.md │ │ └── challenge_13.c ├── java │ └── slandau3 │ │ └── src │ │ └── IntegerPalindrome.java ├── python │ ├── alexbotello │ │ ├── README.md │ │ └── src │ │ │ ├── palin.py │ │ │ └── tests.py │ ├── ning │ │ ├── README.md │ │ ├── challenge_13.py │ │ └── test.py │ ├── sarcodian │ │ ├── READ.me │ │ └── src │ │ │ ├── challenge_13.py │ │ │ └── challenge_13_tests.py │ └── system123 │ │ ├── challenge_13.py │ │ └── tests.py ├── rust │ └── deg4uss3r │ │ └── challenge_13 │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── src │ │ └── main.rs │ │ └── tests │ │ └── test_suite.bsh └── tests │ ├── test1 │ ├── test2 │ ├── test3 │ ├── test4 │ └── test5 ├── challenge_14 ├── README.md ├── c │ └── karanchawla │ │ ├── README.md │ │ └── challenge_14.c ├── java │ ├── jdfurlan │ │ ├── README.md │ │ └── src │ │ │ └── ReversingALinkedList.java │ └── slandau3 │ │ └── src │ │ └── Reverse.java ├── python │ └── system123 │ │ └── challenge_14.py └── tests │ ├── test1 │ ├── test2 │ ├── test3 │ └── test4 ├── challenge_15 ├── README.md └── java │ └── slandau3 │ └── src │ └── TakingCandyFromABaby.java ├── challenge_16 ├── README.md ├── c │ └── karanchawla │ │ ├── README.md │ │ └── challenge_16.c ├── cpp │ └── karanchawla │ │ ├── README.md │ │ └── src │ │ ├── CMakeLists.txt │ │ ├── challenge_16.cpp │ │ ├── challenge_16.h │ │ └── main.cpp └── python │ ├── slandau3 │ └── perm.py │ └── system123 │ └── challenge_16.py ├── challenge_17 ├── README.md └── python │ ├── slandau3 │ └── change.py │ └── system123 │ └── challenge_17.py ├── challenge_18 ├── C │ └── yourpalnurav │ │ ├── README.md │ │ └── YPN_Paths.c ├── README.md ├── c │ └── karanchawla │ │ ├── README.md │ │ └── challenge_18.c └── python │ ├── slandau3 │ └── paths.py │ └── system123 │ └── challenge_18.py ├── challenge_2 ├── Java │ ├── JakeBash │ │ └── Challenge_2.java │ └── Leigh │ │ ├── Histogram.java │ │ ├── SingleNumber.java │ │ └── SingleNumber2.java ├── Julia │ └── DTCitron │ │ ├── README.md │ │ └── src │ │ └── unrepeat.jl ├── README.md ├── c │ ├── almyk │ │ ├── README.md │ │ └── src │ │ │ └── main.c │ ├── nasciiboy │ │ ├── Makefile │ │ ├── README.md │ │ └── src │ │ │ └── main.c │ ├── scottsquatch │ │ ├── Makefile │ │ ├── README.md │ │ └── src │ │ │ └── main.c │ └── xor-eax-eax │ │ ├── README.md │ │ └── src │ │ └── challenge2.c ├── cpp │ ├── blakebarnes00 │ │ ├── Makefile │ │ └── src │ │ │ └── main.cpp │ ├── dewie102 │ │ ├── README.md │ │ └── src │ │ │ └── SingleNumber.cpp │ ├── manuel │ │ ├── Makefile │ │ ├── README.md │ │ └── src │ │ │ ├── include │ │ │ └── singleNumber.h │ │ │ ├── main.cpp │ │ │ └── singleNumber.cpp │ └── sven │ │ ├── README.md │ │ └── src │ │ └── Single.cpp ├── csharp │ ├── bdoner │ │ ├── README.md │ │ └── single.cs │ ├── fojo │ │ └── Challenge2.cs │ └── sven │ │ ├── README.md │ │ └── src │ │ └── Single.cs ├── elixir │ └── joegotflow83 │ │ └── single_number │ │ ├── .gitignore │ │ ├── README.md │ │ ├── config │ │ └── config.exs │ │ ├── lib │ │ └── single_number.ex │ │ ├── mix.exs │ │ └── test │ │ ├── single_number_test.exs │ │ └── test_helper.exs ├── go │ ├── erocs │ │ └── find_singleton.go │ ├── makernaren │ │ ├── README.md │ │ ├── single_number.go │ │ └── single_number_test.go │ ├── natdm │ │ ├── single.go │ │ └── single_test.go │ └── rchicoli │ │ ├── README.md │ │ └── src │ │ ├── single_number.go │ │ └── single_number_test.go ├── haskell │ └── halogenandtoast │ │ ├── README.md │ │ └── src │ │ ├── Challenge.hs │ │ ├── Main.hs │ │ └── Spec.hs ├── java │ ├── jdfurlan │ │ ├── README.md │ │ └── src │ │ │ └── SingleNumber.java │ ├── jrtn │ │ └── SingleNumber.java │ └── zmiller91 │ │ └── SingleNumber.java ├── javascript │ ├── Zirhc86 │ │ ├── readme.md │ │ └── src │ │ │ ├── index.html │ │ │ └── singleNumber.js │ ├── phathousecat │ │ ├── README.md │ │ ├── index.html │ │ └── uniqueValue.js │ └── rawphs │ │ ├── README.md │ │ └── index.js ├── postscript │ └── moonpatroller │ │ ├── README.md │ │ └── unique_number.txt ├── python │ ├── Atakyn │ │ └── c2.py │ ├── CindyB │ │ ├── README.md │ │ └── src │ │ │ └── singleNumber.py │ ├── DTCitron │ │ ├── README.md │ │ └── src │ │ │ └── main.py │ ├── Loran425 │ │ ├── README.md │ │ └── src │ │ │ └── main.py │ ├── OkraArmband │ │ ├── README.md │ │ └── src │ │ │ └── unique_ele.py │ ├── ajschrier │ │ ├── README.md │ │ └── challenge_2.py │ ├── alexbotello │ │ ├── README.md │ │ └── main.py │ ├── bryantpq │ │ ├── README.md │ │ └── search_item.py │ ├── cactus │ │ ├── README.md │ │ └── src │ │ │ └── challenge_2.py │ ├── dfdx2 │ │ └── count.py │ ├── flickdm │ │ ├── Readme.md │ │ ├── challenge2.py │ │ └── test.py │ ├── hkl0902 │ │ └── challenge_2.py │ ├── kar-moore │ │ ├── README.md │ │ └── src │ │ │ └── challenge2.py │ ├── lepmets │ │ ├── README.md │ │ └── src │ │ │ └── challenge_2.py │ ├── lex32pem │ │ ├── Readme.md │ │ └── challenge_2.py │ ├── mical │ │ └── main.py │ ├── mindm │ │ ├── README.md │ │ └── src │ │ │ └── single.py │ ├── mjuiuc │ │ └── SingleNumber.py │ ├── mrkwll │ │ └── solution.py │ ├── nebi │ │ ├── README.md │ │ └── src │ │ │ └── single_number.py │ ├── ning │ │ └── challenge_2.py │ ├── phil-harmoniq │ │ ├── README.md │ │ └── challenge_2.py │ ├── polar │ │ ├── README.md │ │ └── src │ │ │ └── SingleDigit.py │ ├── popcorn_anachronism │ │ ├── challenge_2.py │ │ └── readme.md │ ├── psonghi │ │ ├── README.md │ │ └── src │ │ │ └── single_number.py │ ├── py2k5 │ │ └── findNonRepeatNumber.py │ ├── returnlove │ │ ├── README.md │ │ └── src │ │ │ └── single_number.py │ ├── sarcodian │ │ ├── README.md │ │ └── src │ │ │ └── challenge_2.py │ ├── shaowen │ │ └── single_n.py │ ├── slandau │ │ ├── README.md │ │ └── single.py │ ├── slansford │ │ ├── README.md │ │ └── src │ │ │ └── challenge_2.py │ ├── sysek │ │ ├── README.md │ │ └── src │ │ │ └── singlenumber.py │ ├── system123 │ │ ├── README.md │ │ └── challenge2.py │ ├── tvanderwal │ │ ├── README.md │ │ └── src │ │ │ └── challenge_2.py │ ├── ukirderohit │ │ ├── README.md │ │ └── c2.py │ ├── walkingluo │ │ ├── README.md │ │ └── src │ │ │ └── single_number.py │ ├── whiterd │ │ ├── README.md │ │ └── src │ │ │ └── find_distinct.py │ └── zooks97 │ │ ├── README.md │ │ └── src │ │ └── singleFinder.py ├── r │ ├── aev1tas │ │ └── uniquevalue.R │ └── henriquefb │ │ ├── README.md │ │ └── challenge2hfb.R ├── ruby │ ├── ConorWright │ │ └── unique_int.rb │ └── selectivealso │ │ ├── methods.rb │ │ ├── readme.md │ │ └── single_number.rb ├── rust │ ├── deg4uss3r │ │ └── challenge_2 │ │ │ ├── Cargo.lock │ │ │ ├── Cargo.toml │ │ │ ├── README.md │ │ │ ├── src │ │ │ └── lib.rs │ │ │ └── tests │ │ │ └── main.rs │ ├── josephpd3 │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── src │ │ │ └── lib.rs │ │ └── tests │ │ │ └── single_count.rs │ ├── makernaren │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src │ │ │ ├── main.rs │ │ │ └── single_number.rs │ └── myrrlyn │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src │ │ ├── lib.rs │ │ └── main.rs ├── scala │ └── ndsmith3 │ │ ├── README.md │ │ └── SingleNumber.scala └── testfiles │ ├── o1 │ ├── o2 │ ├── o3 │ ├── o4 │ ├── o5 │ ├── t1 │ ├── t2 │ ├── t3 │ ├── t4 │ └── t5 ├── challenge_3 ├── C │ ├── karanchawla │ │ └── src │ │ │ ├── README.md │ │ │ └── majElement.c │ └── xor-eax-eax │ │ ├── README.md │ │ └── src │ │ └── main.c ├── README.md ├── cpp │ ├── blakebarnes00 │ │ ├── Makefile │ │ └── src │ │ │ └── main.cpp │ ├── dewie102 │ │ ├── README.md │ │ └── src │ │ │ └── MajorityElement.cpp │ ├── manuel │ │ ├── Makefile │ │ ├── README.md │ │ └── src │ │ │ ├── include │ │ │ └── majorityElement.h │ │ │ ├── main.cpp │ │ │ └── majorityElement.cpp │ └── rbrt │ │ ├── README.md │ │ └── src │ │ └── [cpp]Challenge_3.cpp ├── elixir │ └── joegotflow83 │ │ └── majority_element │ │ ├── .gitignore │ │ ├── README.md │ │ ├── config │ │ └── config.exs │ │ ├── lib │ │ └── majority_element.ex │ │ ├── mix.exs │ │ └── test │ │ ├── majority_element_test.exs │ │ └── test_helper.exs ├── go │ ├── erocs │ │ └── majority.go │ ├── makernaren │ │ ├── README.md │ │ ├── max_occurance.go │ │ └── max_occurance_test.go │ ├── natdm │ │ ├── majority.go │ │ └── majority_test.go │ └── rchicoli │ │ ├── README.md │ │ └── src │ │ ├── majority_element.go │ │ └── majority_element_test.go ├── haskell │ └── halogenandtoast │ │ ├── README.md │ │ └── src │ │ ├── Challenge.hs │ │ ├── Main.hs │ │ └── Spec.hs ├── java │ ├── jdfurlan │ │ ├── README.md │ │ └── src │ │ │ └── MajorityElement.java │ └── zmiller91 │ │ └── MajorityElement.java ├── javascript │ ├── Zirhc86 │ │ ├── readme.md │ │ └── src │ │ │ ├── index.html │ │ │ └── majority-element.js │ └── rawphs │ │ ├── README.md │ │ └── src │ │ └── index.js ├── julia │ └── DTCitron │ │ ├── README.md │ │ └── src │ │ └── majority.jl ├── postscript │ └── moonpatroller │ │ ├── README.md │ │ └── majority_element.txt ├── python │ ├── Atakyn │ │ └── c3.py │ ├── CindyB │ │ ├── README.md │ │ └── src │ │ │ └── majorityElement.py │ ├── DTCitron │ │ ├── README.md │ │ └── src │ │ │ └── main.py │ ├── Loran425 │ │ ├── README.md │ │ └── src │ │ │ └── main.py │ ├── Mical │ │ └── findMajorityElement.py │ ├── OkraArmband │ │ ├── README.md │ │ └── src │ │ │ └── maj_ele.py │ ├── ajschrier │ │ ├── README.md │ │ └── challenge_3.py │ ├── alexbotello │ │ ├── README.md │ │ └── main.py │ ├── bryantpq │ │ ├── README.md │ │ └── find_majority.py │ ├── dfdx2 │ │ └── challenge_3.py │ ├── hkl0902 │ │ └── Challenge_3.py │ ├── kar-moore │ │ ├── README.md │ │ └── src │ │ │ └── challenge3.py │ ├── lepmets │ │ ├── README.md │ │ └── src │ │ │ └── challenge_3.py │ ├── lex32pem │ │ ├── challenge_3.py │ │ └── readme.md │ ├── mindm │ │ ├── README.md │ │ └── src │ │ │ └── majority.py │ ├── mjuiuc │ │ └── MajorityElement-Easy.py │ ├── ning │ │ └── challenge_3.py │ ├── phil-harmoniq │ │ └── challenge_3.py │ ├── popcorn_anachronism │ │ ├── readme.md │ │ └── src │ │ │ └── challenge_3.py │ ├── returnlove │ │ ├── README.md │ │ └── src │ │ │ └── majority_element.py │ ├── sarcodian │ │ ├── README.md │ │ └── src │ │ │ └── challenge_3.py │ ├── shaowen │ │ └── majority_element.py │ ├── slandau │ │ ├── README.md │ │ └── majority.py │ ├── slansford │ │ ├── README.md │ │ └── src │ │ │ └── challenge_3.py │ ├── sysek │ │ ├── README.md │ │ └── src │ │ │ └── majority.py │ ├── system123 │ │ ├── README.md │ │ └── challenge3.py │ ├── tvanderwal │ │ ├── README.md │ │ └── src │ │ │ └── challenge_3.py │ ├── whiterd │ │ ├── README.md │ │ └── src │ │ │ └── find_major.py │ └── wost │ │ ├── README.md │ │ └── main.py ├── r │ ├── aev1tas │ │ └── MajorityElement.R │ └── henriquefb │ │ ├── README.md │ │ └── challenge3hfb.R ├── ruby │ └── selectivealso │ │ ├── majority.rb │ │ └── readme.md ├── rust │ ├── deg4uss3r │ │ └── challenge_3 │ │ │ ├── Cargo.lock │ │ │ ├── Cargo.toml │ │ │ ├── README.md │ │ │ ├── src │ │ │ └── lib.rs │ │ │ └── tests │ │ │ └── main.rs │ └── myrrlyn │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src │ │ ├── lib.rs │ │ └── main.rs ├── scala │ └── ndsmith3 │ │ ├── MajorityElement.scala │ │ └── README.md └── testfiles │ ├── o1 │ ├── o2 │ ├── o3 │ ├── o4 │ ├── o5 │ ├── t1 │ ├── t2 │ ├── t3 │ ├── t4 │ └── t5 ├── challenge_4 ├── README.md ├── c │ ├── karanchawla │ │ ├── README.md │ │ └── challenge_4.c │ └── kokimame │ │ ├── README.md │ │ └── invertTree.c ├── cpp │ ├── dewie102 │ │ ├── README.md │ │ └── src │ │ │ ├── BinaryTree.cpp │ │ │ ├── InvertBT.cpp │ │ │ └── include │ │ │ └── BinaryTree.h │ └── manuel │ │ ├── Makefile │ │ ├── README.md │ │ └── src │ │ ├── include │ │ └── treeInversion.h │ │ ├── input │ │ ├── main.cpp │ │ └── treeInversion.cpp ├── go │ ├── erocs │ │ └── invert_tree.go │ └── natdm │ │ ├── tree.go │ │ └── tree_test.go ├── haskell │ └── halogenandtoast │ │ ├── README.md │ │ └── src │ │ ├── Challenge.hs │ │ └── Spec.hs ├── java │ ├── jdfurlan │ │ ├── README.md │ │ └── src │ │ │ ├── InvertBinaryTree.java │ │ │ └── Node.java │ └── zmiller91 │ │ └── src │ │ └── zmiller91 │ │ ├── InvertBinaryTree.java │ │ └── Node.java ├── javascript │ └── Zirhc86 │ │ ├── readme.md │ │ └── src │ │ ├── binary-tree.js │ │ └── index.html ├── postscript │ └── moonpatroller │ │ ├── README.md │ │ └── invert_tree.txt ├── python │ ├── Atakyn │ │ └── c4.py │ ├── CindyB │ │ ├── README.md │ │ └── src │ │ │ ├── Challenge4.py │ │ │ ├── Tree.py │ │ │ └── TreeNode.py │ ├── Loran425 │ │ ├── README.md │ │ └── src │ │ │ └── main.py │ ├── Mical │ │ ├── README.md │ │ └── srs │ │ │ └── main.py │ ├── OkraArmband │ │ ├── README.md │ │ ├── src │ │ │ └── challenge_4.py │ │ ├── tree.jpg │ │ └── treeReversed.jpg │ ├── ajschrier │ │ ├── InvertTree.py │ │ ├── InvertTreeTests.py │ │ └── README.md │ ├── bryantpq │ │ ├── README.md │ │ └── tree.py │ ├── dfdx2 │ │ ├── README.md │ │ └── binary1.py │ ├── hkl0902 │ │ └── Challenge_4.py │ ├── mindm │ │ ├── README.md │ │ └── src │ │ │ ├── btree.py │ │ │ └── test_invert.py │ ├── mjuiuc │ │ └── InvertBinaryTree-Easy.py │ ├── ning │ │ └── challenge_4.py │ ├── popcorn_anachronism │ │ ├── readme.md │ │ └── src │ │ │ └── challenge_4.py │ ├── sarcodian │ │ ├── README.md │ │ └── src │ │ │ └── challenge_4.py │ ├── shaowen │ │ ├── README.md │ │ └── bi_tree_reverse.py │ ├── slandau │ │ ├── README.md │ │ └── reverse_tree.py │ ├── slansford │ │ ├── README.md │ │ └── src │ │ │ ├── README.md │ │ │ └── challenge_4.py │ ├── system123 │ │ ├── README.md │ │ └── challenge4.py │ ├── tvanderwal │ │ ├── README.md │ │ └── src │ │ │ └── challenge_4.py │ ├── whiterd │ │ ├── README.md │ │ └── src │ │ │ └── invert_bin.py │ └── wost │ │ ├── Node.py │ │ └── main.py ├── scala │ └── ndsmith3 │ │ ├── BinaryTreeInversion.scala │ │ └── README.md ├── tree.jpg ├── treeReversed.jpg └── x86 │ └── x95 │ ├── README.md │ └── src │ ├── challenge4.c │ └── invertTree.s ├── challenge_5 ├── README.md ├── c │ └── karanchawla │ │ ├── README.md │ │ └── src │ │ └── challenge5.c ├── cpp │ ├── dewie102 │ │ ├── README.md │ │ └── src │ │ │ └── Difference.cpp │ ├── manuel │ │ ├── Makefile │ │ ├── README.md │ │ └── src │ │ │ ├── findTheDifference.cpp │ │ │ ├── include │ │ │ └── findTheDifference.h │ │ │ └── main.cpp │ └── rbrt │ │ ├── README.md │ │ └── src │ │ └── [cpp]Challenge_5.cpp ├── elixir │ └── joegotflow83 │ │ └── find_difference │ │ ├── .gitignore │ │ ├── README.md │ │ ├── config │ │ └── config.exs │ │ ├── lib │ │ └── find_difference.ex │ │ ├── mix.exs │ │ └── test │ │ ├── find_difference_test.exs │ │ └── test_helper.exs ├── go │ └── natdm │ │ ├── diff.go │ │ └── diff_test.go ├── haskell │ └── halogenandtoast │ │ ├── README.md │ │ └── src │ │ ├── Challenge.hs │ │ └── Spec.hs ├── java │ ├── hkl0902 │ │ ├── FindTheDifference.java │ │ ├── Makefile │ │ ├── README.md │ │ └── UnitTest.java │ └── jdfurlan │ │ ├── README.md │ │ └── src │ │ └── FindTheDifference.java ├── javascript │ └── Zirhc86 │ │ ├── readme.md │ │ └── src │ │ ├── find-the-difference.js │ │ └── index.html ├── postscript │ └── moonpatroller │ │ ├── README.md │ │ └── string_diff.txt ├── python │ ├── Atakyn │ │ └── c5.py │ ├── CindyB │ │ ├── README.md │ │ └── src │ │ │ ├── FindTheDifference.py │ │ │ └── test.py │ ├── Loran425 │ │ ├── README.md │ │ └── src │ │ │ ├── FindTheDifference.py │ │ │ └── test.py │ ├── ajschrier │ │ ├── FindTheDifference.py │ │ ├── README.md │ │ └── test.py │ ├── alexbotello │ │ ├── FindTheDifference.py │ │ ├── README.md │ │ └── test.py │ ├── bryantpq │ │ ├── FindTheDifference.py │ │ └── test.py │ ├── mindm │ │ ├── README.md │ │ └── src │ │ │ ├── difference.py │ │ │ └── test.py │ ├── mjuiuc │ │ ├── FindTheDifference.py │ │ └── test.py │ ├── ning │ │ ├── FindTheDifference.py │ │ └── README.md │ ├── popcorn_anachronism │ │ ├── readme.md │ │ └── src │ │ │ ├── FindTheDifference.py │ │ │ └── test.py │ ├── sarcodian │ │ ├── README.md │ │ └── src │ │ │ ├── challenge_5.py │ │ │ └── unittest-from-mjuiuc │ │ │ ├── FindTheDifference.py │ │ │ └── test.py │ ├── shaowen │ │ ├── FindTheDifference.py │ │ └── test.py │ ├── slandau │ │ ├── FindTheDifference.py │ │ └── README.md │ ├── slansford │ │ ├── README.md │ │ └── src │ │ │ ├── FindTheDifference.py │ │ │ └── test.py │ ├── system123 │ │ ├── FindTheDifference.py │ │ └── test.py │ ├── tvanderwal │ │ ├── README.md │ │ └── src │ │ │ ├── FindTheDifference.py │ │ │ └── test.py │ └── wost │ │ ├── .gitignore │ │ ├── FindTheDifference.py │ │ ├── README.md │ │ └── test.py ├── ruby │ └── selectivealso │ │ ├── find_new.rb │ │ ├── methods.rb │ │ └── readme.md ├── rust │ └── deg4uss3r │ │ └── challenge_5 │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── examples │ │ └── main.rs │ │ ├── src │ │ └── lib.rs │ │ └── tests │ │ ├── main.rs │ │ └── testfiles │ │ ├── o1 │ │ ├── o2 │ │ ├── o3 │ │ ├── t1 │ │ ├── t2 │ │ └── t3 ├── scala │ └── ndsmith3 │ │ ├── FindTheDifference.scala │ │ └── README.md └── testfiles │ ├── o1 │ ├── o2 │ ├── o3 │ ├── t1 │ ├── t2 │ └── t3 ├── challenge_6 ├── README.md ├── cpp │ ├── manuel │ │ ├── Makefile │ │ ├── README.md │ │ └── src │ │ │ ├── include │ │ │ ├── ranges.h │ │ │ └── tools.h │ │ │ ├── main.cpp │ │ │ ├── ranges.cpp │ │ │ └── tools.cpp │ └── rbrt │ │ ├── README.md │ │ └── src │ │ └── [cpp]Challenge_6.cpp ├── haskell │ └── halogenandtoast │ │ ├── README.md │ │ └── src │ │ ├── Challenge.hs │ │ └── Spec.hs ├── java │ ├── jdfurlan │ │ ├── README.md │ │ └── src │ │ │ └── Ranges.java │ └── zmiller91 │ │ ├── README.md │ │ └── RangeArray.java ├── javascript │ └── Zirhc86 │ │ ├── readme.md │ │ └── src │ │ ├── index.html │ │ └── ranges.js ├── postscript │ └── moonpatroller │ │ ├── README.md │ │ ├── compress-ranges.txt │ │ └── test-ranges.txt ├── python │ ├── Atakyn │ │ └── c6.py │ ├── CindyB │ │ ├── README.md │ │ └── src │ │ │ ├── solution.py │ │ │ └── tests.py │ ├── Loran425 │ │ ├── README.md │ │ └── src │ │ │ └── ranges.py │ ├── ajschrier │ │ ├── IntRange.py │ │ ├── IntRangeTests.py │ │ └── README.md │ ├── alexbotello │ │ ├── README.md │ │ └── src │ │ │ ├── ranges.py │ │ │ └── tests.py │ ├── bryantpq │ │ └── ranges.py │ ├── mindm │ │ ├── README.md │ │ └── src │ │ │ ├── ranges.py │ │ │ └── test.py │ ├── mjuiuc │ │ ├── README.md │ │ ├── Solution.py │ │ └── test.py │ ├── ning │ │ ├── README.md │ │ ├── challenge_6.py │ │ └── test.py │ ├── sarcodian │ │ └── src │ │ │ ├── challenge_6.py │ │ │ └── challenge_6_tests.py │ ├── shaowen │ │ ├── ranges.py │ │ └── u_test.py │ ├── slandau3 │ │ ├── ranges.py │ │ └── tests.py │ └── system123 │ │ ├── challenge_6.py │ │ └── tests.py ├── ruby │ └── selectivealso │ │ └── ranges.rb ├── rust │ └── deg4uss3r │ │ └── challenge_6 │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── examples │ │ └── main.rs │ │ ├── src │ │ └── lib.rs │ │ └── tests │ │ └── test.rs ├── scala │ └── ndsmith3 │ │ ├── README.md │ │ └── Ranges.scala └── testfiles │ ├── o1 │ ├── o2 │ ├── o3 │ ├── o4 │ ├── o5 │ ├── t1 │ ├── t2 │ ├── t3 │ ├── t4 │ └── t5 ├── challenge_7 ├── README.md ├── c │ └── karanchawla │ │ ├── README.md │ │ └── missingNumber.c ├── cpp │ ├── manuel │ │ ├── Makefile │ │ ├── README.md │ │ └── src │ │ │ ├── include │ │ │ └── tools.h │ │ │ ├── main.cpp │ │ │ └── tools.cpp │ └── rbrt │ │ └── src │ │ └── [cpp]Challenge_7.cpp ├── find_missing_num.py ├── haskell │ └── halogenandtoast │ │ ├── README.md │ │ └── src │ │ ├── Challenge.hs │ │ └── Spec.hs ├── java │ ├── jdfurlan │ │ ├── README.md │ │ └── src │ │ │ └── FindTheMissingNumber.java │ └── zmiller91 │ │ ├── MissingNumber.java │ │ └── README.md ├── javascript │ └── Zirhc86 │ │ ├── readme.md │ │ └── src │ │ ├── index.html │ │ └── missing-number.js ├── postscript │ ├── README.md │ └── find_missing.txt ├── python │ ├── Atakyn │ │ └── c7.py │ ├── CindyB │ │ ├── README.md │ │ └── src │ │ │ ├── solution.py │ │ │ └── tests.py │ ├── Loran425 │ │ ├── README.md │ │ └── src │ │ │ ├── missing.py │ │ │ └── tests.py │ ├── aemc │ │ ├── README.md │ │ ├── find_missing_number.py │ │ ├── src │ │ │ ├── find_missing_number.py │ │ │ └── tests.py │ │ └── tests.py │ ├── ajschrier │ │ ├── MissingNumber.py │ │ ├── README.md │ │ └── Test_MissingNumber.py │ ├── alexbotello │ │ ├── README.md │ │ ├── missing_num.py │ │ └── tests.py │ ├── bryantpq │ │ ├── README.md │ │ └── find_missing_number.py │ ├── mindm │ │ ├── README.md │ │ └── src │ │ │ ├── missing.py │ │ │ └── test.py │ ├── mjuiuc │ │ ├── README.md │ │ ├── solution.py │ │ └── test.py │ ├── ning │ │ ├── README.md │ │ ├── challenge_7.py │ │ └── test.py │ ├── sarcodian │ │ ├── READ.me │ │ └── src │ │ │ ├── challenge_7.py │ │ │ └── challenge_7_tests.py │ ├── slandau3 │ │ ├── find_missing_number.py │ │ └── tests.py │ ├── slansford │ │ ├── README.md │ │ └── src │ │ │ ├── challenge_7.py │ │ │ └── test.py │ ├── system123 │ │ ├── challenge_7.py │ │ └── tests.py │ └── wost │ │ └── find_missing_number.py ├── ruby │ └── selectivealso │ │ ├── missing_num.rb │ │ └── readme.md ├── rust │ └── josephpd3 │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── src │ │ └── lib.rs │ │ └── tests │ │ └── test.rs ├── scala │ └── ndsmith3 │ │ ├── MissingNum.scala │ │ └── README.md ├── testfiles │ ├── o1 │ ├── o2 │ ├── o3 │ ├── o4 │ ├── o5 │ ├── t1 │ ├── t2 │ ├── t3 │ ├── t4 │ └── t5 └── x86 │ └── x95 │ ├── README.md │ └── src │ └── missingnumber.s ├── challenge_8 ├── ArbitLinked-List12.gif ├── README.md ├── c │ └── karanchawla │ │ ├── README.md │ │ └── randomDeepCopy.c ├── java │ ├── jdfurlan │ │ └── src │ │ │ └── RandomPointerLinkedList.java │ └── zmiller91 │ │ ├── README.md │ │ ├── RandomPointerLinkedList.java │ │ └── RandomPointerNode.java ├── linkedlist.jpg ├── python │ ├── Loran425 │ │ ├── README.md │ │ └── src │ │ │ └── linked_list.py │ ├── mjuiuc │ │ ├── README.md │ │ ├── listNode.py │ │ ├── solution.py │ │ └── test.py │ ├── slandau3 │ │ └── random_copy.py │ ├── system123 │ │ ├── README.md │ │ └── challenge_8.py │ └── wost │ │ ├── LinkedList.py │ │ ├── README.md │ │ └── main.py └── ruby │ └── selectivealso │ └── node.rb └── challenge_9 ├── C └── karanchawla │ └── src │ ├── README.md │ └── challenge9.c ├── README.md ├── cpp └── manuel │ ├── Makefile │ ├── README.md │ └── src │ ├── include │ └── tools.h │ ├── main.cpp │ └── tools.cpp ├── java ├── jdfurlan │ ├── README.md │ └── src │ │ └── Squares.java └── zmiller91 │ ├── README.md │ └── Squares.java ├── python ├── alexbotello │ ├── README.md │ └── src │ │ ├── square.py │ │ └── test.py ├── kar-moore │ ├── README.md │ ├── challenge9.py │ └── tests.py ├── mjuiuc │ ├── README.md │ ├── solution.py │ ├── solution_template.py │ └── test.py ├── ning │ ├── README.md │ ├── challenge_9.py │ └── test.py ├── sarcodian │ ├── READ.me │ └── src │ │ ├── challenge_9.py │ │ └── challenge_9_tests.py ├── shaowen │ ├── readme.md │ ├── square_sort.py │ └── unit_test.py ├── slandau3 │ ├── square.py │ └── test.py ├── system123 │ ├── challenge_9.py │ └── tests.py └── wost │ ├── README.md │ └── src │ └── main.py ├── ruby └── selectivealso │ └── squared_array.rb ├── rust └── josephpd3 │ ├── Cargo.lock │ ├── Cargo.toml │ ├── README.md │ ├── src │ └── lib.rs │ └── tests │ └── test.rs └── testfiles ├── o1 ├── o2 ├── o3 ├── o4 ├── o5 ├── o6 ├── t1 ├── t2 ├── t3 ├── t4 ├── t5 └── t6 /.python-version: -------------------------------------------------------------------------------- 1 | 3.5.2 2 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | All contributers must aggree to the CLA (Contributer License Agreement) located at https://gist.github.com/ManuelMeraz/46768d12d886f39e916663854aa75501 before submissions will be accepted. The service at https://cla-assistant.io is used to track CLA acceptance. For your first pull request and for any updates to the CLA, the service will have you agree to the current CLA as part of the pull request. 2 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | This code has been contributed to https://github.com/YearOfProgramming/2017Challenges 2 | for academic purposes. There are no guarantees of any form and it is reasonable to 3 | expect that any code here is non-functional or incorrect. 4 | -------------------------------------------------------------------------------- /challenge_0/README.md: -------------------------------------------------------------------------------- 1 | #Hello World 2 | 3 | ##Premise 4 | 5 | - Hello and welcome to our little community! We're glad to have you! 6 | - Your first task is to implement a simple Hello World program in the language of your choice. Happy coding! 7 | -------------------------------------------------------------------------------- /challenge_0/bash/deku-jacktraf/Readme.md: -------------------------------------------------------------------------------- 1 | Run like so ./hello-world.sh 2 | Make sure the file is set to be executable: 3 | If using a linux system, type: 4 | chmod +x ./hello-world.sh 5 | -------------------------------------------------------------------------------- /challenge_0/bash/deku-jacktraf/hello-world.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Hello World!" 3 | -------------------------------------------------------------------------------- /challenge_0/bash/ning/README.md: -------------------------------------------------------------------------------- 1 | #Challenge #0, Hello World 2 | 3 | This script echoes 'Hello world!'. 4 | 5 | ## Learning Points 6 | 7 | You gotta execute batch scripts with a preceding `./`, yo. 8 | -------------------------------------------------------------------------------- /challenge_0/bash/ning/challenge_0.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Hello world!" 4 | -------------------------------------------------------------------------------- /challenge_0/c/almyk/src/helloworld.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void){ 4 | printf("Hello, World!\n"); 5 | 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /challenge_0/c/boilerup_brian/README.md: -------------------------------------------------------------------------------- 1 | Hey there, world! let's do this thing. 2 | -------------------------------------------------------------------------------- /challenge_0/c/boilerup_brian/helloWorld.c: -------------------------------------------------------------------------------- 1 | #include 2 | main () { 3 | printf("Hello World!"); 4 | return 0; 5 | } 6 | -------------------------------------------------------------------------------- /challenge_0/c/jarydremillard/hello_world.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | printf("hello world!"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /challenge_0/c/kmaitski/hello_world.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | write(1, "Hello World!\n", 13); 6 | return (0); 7 | } 8 | -------------------------------------------------------------------------------- /challenge_0/c/nasciiboy/Makefile: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | SRCDIR = src 3 | OUTDIR = bin 4 | OUTPUT = helloWorld 5 | RM = rm -rf 6 | 7 | all: $(SRCDIR)/main.c 8 | mkdir -p $(OUTDIR) 9 | $(CC) -g -Wall -o $(OUTDIR)/$(OUTPUT) $(SRCDIR)/*.c 10 | 11 | clean: 12 | $(RM) $(OUTDIR)/* 13 | 14 | test: 15 | @$(OUTDIR)/$(OUTPUT) 16 | -------------------------------------------------------------------------------- /challenge_0/c/nasciiboy/README.md: -------------------------------------------------------------------------------- 1 | # Hello World 2 | 3 | Print "Hello World" in stdout. 4 | 5 | ## Building 6 | 7 | ``` bash 8 | make 9 | ``` 10 | 11 | ## Running 12 | 13 | ``` bash 14 | make test 15 | ``` 16 | 17 | ## Cleanup 18 | 19 | ``` bash 20 | make clean 21 | ``` 22 | -------------------------------------------------------------------------------- /challenge_0/c/nasciiboy/src/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(){ 4 | puts( "Hello World!"); 5 | 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /challenge_0/c/scottsquatch/Makefile: -------------------------------------------------------------------------------- 1 | SRCDIR=src 2 | OUTDIR=bin 3 | APPNAME=helloworld 4 | RM=rm -rf 5 | 6 | all: $(SRCDIR)/main.c 7 | mkdir -p $(OUTDIR) 8 | gcc -g -Wall -o $(OUTDIR)/$(APPNAME) $(SRCDIR)/* 9 | 10 | clean: 11 | $(RM) $(OUTDIR)/* 12 | -------------------------------------------------------------------------------- /challenge_0/c/scottsquatch/README.md: -------------------------------------------------------------------------------- 1 | # Hello World Program for c. 2 | Prints a message to the screen. 3 | 4 | ## Building 5 | ``` bash 6 | make 7 | ``` 8 | 9 | ## Running 10 | ``` bash 11 | ./helloworld 12 | ``` 13 | 14 | ## Cleanup 15 | ``` bash 16 | make clean 17 | ``` 18 | -------------------------------------------------------------------------------- /challenge_0/c/scottsquatch/src/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | printf("Hello YearOfProgramming!\n"); 6 | 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /challenge_0/c/sysek/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 0 2 | 3 | ### 1. Approch to solving the problem 4 | Hello world written in C 5 | 6 | ### 2. How to compile and run this code? 7 | 8 | Compiling: 9 | ``` 10 | $ gcc main.c -o main 11 | ``` 12 | 13 | ### 3. How to run ? 14 | Simple, just put 15 | 16 | ``` 17 | $ ./main 18 | ``` 19 | in terminal and program will print `Hello world`! 20 | -------------------------------------------------------------------------------- /challenge_0/c/sysek/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char ** argv) { 4 | printf("Hello world!"); 5 | } 6 | -------------------------------------------------------------------------------- /challenge_0/c/tyleroar/README.md: -------------------------------------------------------------------------------- 1 | Hello World in C 2 | -------------------------------------------------------------------------------- /challenge_0/c/tyleroar/src/hello_world.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() { 3 | printf("Hello world!\n"); 4 | return 0; 5 | } 6 | -------------------------------------------------------------------------------- /challenge_0/c/xor-eax-eax/src/challenge0.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | printf("Hello world!\n"); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /challenge_0/c/zooks97/README.md: -------------------------------------------------------------------------------- 1 | ## Compile 2 | On a *nix system with gcc, run 3 | $gcc helloWorld.c -o 'output.file' 4 | 5 | ## Run 6 | $./'output.file' 7 | 8 | ## Explanation 9 | Uses the stdio printf function to print "Hello, World!" to the screen with a new line. 10 | -------------------------------------------------------------------------------- /challenge_0/c/zooks97/src/helloWorld.c: -------------------------------------------------------------------------------- 1 | #include /* standard i/o library */ 2 | 3 | int main(){ 4 | printf("Hello, World!\n"); /* print statement */ 5 | return 0; /* return that all went well */ 6 | } 7 | -------------------------------------------------------------------------------- /challenge_0/coffeescript/kedarbramhe/coffeescripts/hello_world.coffee: -------------------------------------------------------------------------------- 1 | console.log "hello world" 2 | -------------------------------------------------------------------------------- /challenge_0/coffeescript/kedarbramhe/javascripts/hello_world.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.12.2 2 | (function() { 3 | console.log("hello world"); 4 | 5 | }).call(this); 6 | -------------------------------------------------------------------------------- /challenge_0/cpp/alexbotello/main.cpp: -------------------------------------------------------------------------------- 1 | // Hello World 2 | #include 3 | using namespace std; 4 | 5 | int main(){ 6 | 7 | cout << "Hello, World!"; 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /challenge_0/cpp/battlefrog/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | std::cout << "Hello World!" << std::endl; 6 | } -------------------------------------------------------------------------------- /challenge_0/cpp/battlefrog/readme.md: -------------------------------------------------------------------------------- 1 | ------------------------------------------------ 2 | HOW TO COMPILE 3 | ------------------------------------------------ 4 | 5 | 1. Goto the directory of the file with a terminal / command prompt 6 | 2. Use a c++ complier to turn the file into an exe 7 | 3. Run the exe -------------------------------------------------------------------------------- /challenge_0/cpp/blakebarnes00/Makefile: -------------------------------------------------------------------------------- 1 | CXX = g++ 2 | FLG = -w -std=c++11 3 | 4 | all: 5 | $(CXX) $(FLG) -o HelloWorld main.cpp 6 | -------------------------------------------------------------------------------- /challenge_0/cpp/blakebarnes00/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | std::cout << "Hello World!\n"; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /challenge_0/cpp/chowey/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | std::cout << "Hello, World!" << std::endl; 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /challenge_0/cpp/chowey/readme.md: -------------------------------------------------------------------------------- 1 | Self-Explanatory. -------------------------------------------------------------------------------- /challenge_0/cpp/dewie102/src/HelloWorld.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argv, char** argc) { 4 | std::cout << "Hello, World!" << std::endl; 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /challenge_0/cpp/flavabox/main.cpp: -------------------------------------------------------------------------------- 1 | //challenge_0 by:flavabox 2 | 3 | #include 4 | using namespace std; 5 | 6 | int main() { 7 | 8 | cout << "Hello World!" << endl; 9 | 10 | return 0; 11 | } -------------------------------------------------------------------------------- /challenge_0/cpp/manuel/README.md: -------------------------------------------------------------------------------- 1 | #Challenge_0 Solution 2 | 3 | To run my code you will need to compile it and then run it through the command lines as follows: 4 | 5 | ``` 6 | $ g++ -o solution.exe src/solution.cpp 7 | $ ./solution.exe 8 | Hello, world! 9 | ``` 10 | -------------------------------------------------------------------------------- /challenge_0/cpp/manuel/src/solution.cpp: -------------------------------------------------------------------------------- 1 | #include // Standard Library used for input/output streams in C++ 2 | 3 | int main(int argc, char **argv) { 4 | 5 | std::cout << "Hello, world!" << std::endl; 6 | 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /challenge_0/cpp/rbrt/README.md: -------------------------------------------------------------------------------- 1 | challenge 0: Hello World 2 | 3 | -------------------------------------------------------------------------------- /challenge_0/cpp/rbrt/src/[C++] Challenge0.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main(){ 5 | cout<<"Hello world!"< 4 | 5 | int main(){ 6 | std::cout << "Hello World!" << std::endl; 7 | } 8 | -------------------------------------------------------------------------------- /challenge_0/cpp/sven/src/HelloWorld.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | std::cout << "Hello World!" << std::endl; 6 | return 0; 7 | } -------------------------------------------------------------------------------- /challenge_0/csharp/badoomtch/helloworld.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ProgrammingPlayground 4 | { 5 | class Program 6 | { 7 | static void Main(string[] args) 8 | { 9 | Console.WriteLine("Hello, world!"); 10 | } 11 | } 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /challenge_0/csharp/bdoner/README.md: -------------------------------------------------------------------------------- 1 | ## Hello 2 | 3 | To compile run `csc.exe hello.cs` and run the resulting file `hello.exe`. -------------------------------------------------------------------------------- /challenge_0/csharp/bdoner/hello.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public class Hello { 4 | static void Main() { 5 | Console.WriteLine("Hello, world!"); 6 | } 7 | } -------------------------------------------------------------------------------- /challenge_0/csharp/fojo/helloworld.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Fojo 4 | { 5 | class Program 6 | { 7 | static void Main(string[] args) 8 | { 9 | Console.WriteLine("Hello, world!"); 10 | } 11 | } 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /challenge_0/csharp/jfrancis2/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 0 - Hello World 2 | ###### C# 3 | 4 | ### 1. Approach to Solving the problem 5 | 6 | Output text "Hello World" 7 | 8 | ### 2. How to compile and run this code 9 | 10 | From the /src directory, use `csc.exe hello.cs` 11 | 12 | ### 3. How this program works 13 | 14 | Read the text! Hi :) -------------------------------------------------------------------------------- /challenge_0/csharp/jfrancis2/src/hello.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace HelloWorld 3 | { 4 | class Hello 5 | { 6 | static void Main() 7 | { 8 | Console.WriteLine("Hello World!"); 9 | Console.WriteLine("Press any key to exit."); 10 | Console.ReadKey(); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /challenge_0/csharp/ross: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace HelloWorld 4 | { 5 | class MainClass 6 | { 7 | public static void Main(string[] args) 8 | { 9 | Console.WriteLine("Hello World!"); 10 | Console.ReadKey(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /challenge_0/csharp/sven/README.md: -------------------------------------------------------------------------------- 1 | #Challenge_0 Solution 2 | 3 | To compile run "csc.exe src\HelloWorld.cs" and run the resulting file "HelloWorld.exe". 4 | 5 | csc can be found in \Microsoft.NET\\<.NET version> 6 | (e.g. C:\Windows\Microsoft.NET\Framework64\v4.0.30319) 7 | or you can open a visual studio command prompt which adds the correct paths to its environment. -------------------------------------------------------------------------------- /challenge_0/csharp/sven/src/HelloWorld.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Challenge_0 4 | { 5 | class Program 6 | { 7 | static void Main(string[] args) 8 | { 9 | Console.WriteLine("Hello World!"); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /challenge_0/elixir/csuzw/README.md: -------------------------------------------------------------------------------- 1 | # Hello World 2 | 3 | ## Build and Run 4 | 5 | * `mix deps.get` 6 | * `iex -S mix` 7 | * `Hello.world` or `Hello.world "Rob"` 8 | 9 | ## Tests 10 | 11 | * `mix test` 12 | 13 | ## Documentation 14 | 15 | * `mix docs` 16 | * Open `./doc/index.html` -------------------------------------------------------------------------------- /challenge_0/elixir/csuzw/src/mix.lock: -------------------------------------------------------------------------------- 1 | %{"earmark": {:hex, :earmark, "1.1.1", "433136b7f2e99cde88b745b3a0cfc3fbc81fe58b918a09b40fce7f00db4d8187", [:mix], []}, 2 | "ex_doc": {:hex, :ex_doc, "0.14.5", "c0433c8117e948404d93ca69411dd575ec6be39b47802e81ca8d91017a0cf83c", [:mix], [{:earmark, "~> 1.0", [hex: :earmark, optional: false]}]}} 3 | -------------------------------------------------------------------------------- /challenge_0/elixir/csuzw/src/test/hello_test.exs: -------------------------------------------------------------------------------- 1 | defmodule HelloTest do 2 | use ExUnit.Case 3 | doctest Hello 4 | end 5 | -------------------------------------------------------------------------------- /challenge_0/elixir/csuzw/src/test/test_helper.exs: -------------------------------------------------------------------------------- 1 | ExUnit.start() 2 | -------------------------------------------------------------------------------- /challenge_0/elixir/joegotflow83/main.ex: -------------------------------------------------------------------------------- 1 | defmodule HelloWorld do 2 | def hello do 3 | "Hello World!" 4 | end 5 | end 6 | 7 | -------------------------------------------------------------------------------- /challenge_0/fsharp/mssabr01/src/HelloWorld.fs: -------------------------------------------------------------------------------- 1 | //Prints "Hello World" to the standard output 2 | 3 | printfn "Hello World" -------------------------------------------------------------------------------- /challenge_0/go/erocs/hello_world.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func main() { 8 | fmt.Println("Hello World!") 9 | } 10 | -------------------------------------------------------------------------------- /challenge_0/go/makernaren/README.md: -------------------------------------------------------------------------------- 1 | ## Hello world! 2 | #### To run the code : 3 | * Install [golgang](https://golang.org/doc/install) 4 | * Open this directory in terminal and run `go run helloworld.go` to compile and run the code. 5 | ``` 6 | $ go run helloworld.go 7 | Hello World! 8 | ``` -------------------------------------------------------------------------------- /challenge_0/go/makernaren/helloworld.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func main() { 8 | fmt.Println("Hello World!") 9 | } 10 | -------------------------------------------------------------------------------- /challenge_0/go/natdm/app.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | ) 6 | 7 | func main() { 8 | log.Println("hello world") 9 | } 10 | -------------------------------------------------------------------------------- /challenge_0/go/shivams/README.md: -------------------------------------------------------------------------------- 1 | ## Hello world! 2 | #### To run the code : 3 | * Install [golgang](https://golang.org/doc/install) 4 | * Open this directory in terminal. 5 | * Set GOPATH environment variable to path of this directory. 6 | * Run `go run helloworld.go` to compile and run the code. 7 | ``` 8 | $ go run helloworld.go 9 | Hello World! 10 | ``` 11 | -------------------------------------------------------------------------------- /challenge_0/go/shivams/hello.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println("Hello World") 7 | } 8 | -------------------------------------------------------------------------------- /challenge_0/go/tml/README.md: -------------------------------------------------------------------------------- 1 | # Hello World - golang 2 | 3 | ## Installing golang with Homebrew 4 | `brew install go` 5 | 6 | ## Running the program 7 | `go run helloworld.go` 8 | 9 | ## Expected result 10 | 11 | `$ go run helloworld.go` 12 | 13 | `Hello, world` -------------------------------------------------------------------------------- /challenge_0/go/tml/src/helloworld.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func main() { 8 | fmt.Println("Hello, world") 9 | } -------------------------------------------------------------------------------- /challenge_0/haskell/halogenandtoast/README.md: -------------------------------------------------------------------------------- 1 | To run simply use `runhaskell` like so: 2 | 3 | `runhaskell src/Main.hs` 4 | -------------------------------------------------------------------------------- /challenge_0/haskell/halogenandtoast/src/Main.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | main :: IO () 4 | main = putStrLn "Hello World" 5 | -------------------------------------------------------------------------------- /challenge_0/java/Leigh/HelloWorld.java: -------------------------------------------------------------------------------- 1 | 2 | public class HelloWorld { 3 | public static void main (String... args) { 4 | System.out.println("Hello, World!"); 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /challenge_0/java/gwong/challenge_0.java: -------------------------------------------------------------------------------- 1 | public class challenge_0 2 | { 3 | public static void main (String[] args)) 4 | { 5 | System.out.println("Hello, World!"); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /challenge_0/java/jdfurlan/README.md: -------------------------------------------------------------------------------- 1 | # HelloWorld 2 | ###### Java 8 3 | 4 | ### 1. Approach to Solving the problem 5 | 6 | Make it unnecessarily slow! 7 | 8 | ### 2. How to compile and run this code 9 | 10 | ``` 11 | javac HelloWorld.java 12 | java HelloWorld 13 | ``` 14 | 15 | ### 3. How this program works 16 | 17 | Simply run it and you'll see "Hello, World!" 18 | -------------------------------------------------------------------------------- /challenge_0/java/jdfurlan/src/HelloWorld.java: -------------------------------------------------------------------------------- 1 | 2 | public class HelloWorld { 3 | 4 | public static void main(String[] args) { 5 | char[] hw = "Hello, World!".toCharArray(); 6 | for (char c : hw) { 7 | System.out.print(c); 8 | } 9 | 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /challenge_0/javascript/Zirhc86/readme.md: -------------------------------------------------------------------------------- 1 | # 2017 Year of Programming 2 | ## Challenge_0 3 | ### Hello-world 4 | #### Synopsis 5 | Outputs "Hello, world" to the console and index.html document. 6 | 7 | #### Instructions 8 | Open index.html in any web browser. Message will appear on page and in browser console. 9 | 10 | ### Contact 11 | Chris -- zirhc86@gmail.com 12 | 13 | https://github.com/Zirhc86 -------------------------------------------------------------------------------- /challenge_0/javascript/Zirhc86/src/hello-world.js: -------------------------------------------------------------------------------- 1 | document.write("

Hello, world

"); 2 | console.log("Hello, world"); -------------------------------------------------------------------------------- /challenge_0/javascript/Zirhc86/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Challenge_0|YoP 2017 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /challenge_0/javascript/collinperkins/helloWorld.js: -------------------------------------------------------------------------------- 1 | // Open file with chrome browser 2 | // Right click and click inspect in menu 3 | // Click on the console tab to view results 4 | 5 | console.log('Hello World!'); 6 | -------------------------------------------------------------------------------- /challenge_0/javascript/collinperkins/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /challenge_0/javascript/collinperkins/readme.md: -------------------------------------------------------------------------------- 1 | Open the html file in chrome. 2 | Right click and click inspect in menu. 3 | Click on the console tab to view results. 4 | -------------------------------------------------------------------------------- /challenge_0/javascript/raijinn/README.md: -------------------------------------------------------------------------------- 1 | Implementing "Hello World" in JavaScript. 2 | 3 | 1) Logging string in console 4 | 2) Displaying string in alert 5 | 3) Displaying string in document 6 | -------------------------------------------------------------------------------- /challenge_0/javascript/raijinn/src/challenge_0.js: -------------------------------------------------------------------------------- 1 | console.log("Hello World"); 2 | 3 | alert("Hello World"); 4 | 5 | document.write("Hello World"); 6 | -------------------------------------------------------------------------------- /challenge_0/javascript/rawphs/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 0: Hello World! 2 | 3 | ## Usage 4 | On your terminal, run: 5 | 6 | `$ node index.js` -------------------------------------------------------------------------------- /challenge_0/javascript/rawphs/src/index.js: -------------------------------------------------------------------------------- 1 | console.log('Hello World!') 2 | -------------------------------------------------------------------------------- /challenge_0/javascript/saif/README.md: -------------------------------------------------------------------------------- 1 | Open the webpage in any browser. An alert box will say "Hello World". -------------------------------------------------------------------------------- /challenge_0/javascript/saif/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hello World 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /challenge_0/javascript/ukirderohit/README.md: -------------------------------------------------------------------------------- 1 | Open the webpage in any browser. Open Console that will say "Hello World". -------------------------------------------------------------------------------- /challenge_0/javascript/ukirderohit/hello.js: -------------------------------------------------------------------------------- 1 | console.log("Hello World"); -------------------------------------------------------------------------------- /challenge_0/javascript/ukirderohit/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Challenge 0 4 | 5 |

Challenge 0

6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /challenge_0/julia/DTCitron/README.md: -------------------------------------------------------------------------------- 1 | #Hello World 2 | 3 | ##Premise 4 | 5 | - Hello and welcome to our little community! We're glad to have you! 6 | - Your first task is to implement a simple Hello World program in the language of your choice. Happy coding! 7 | 8 | ##Implementation 9 | 10 | - Call `julia helloworld.jl' in the `src' directory 11 | -------------------------------------------------------------------------------- /challenge_0/julia/DTCitron/src/helloworld.jl: -------------------------------------------------------------------------------- 1 | println("Hello World!") 2 | -------------------------------------------------------------------------------- /challenge_0/php/selectivealso/readme.md: -------------------------------------------------------------------------------- 1 | ## To Run 2 | You'll need to have [php installed](http://php.net/manual/en/install.php) 3 | 4 | From the php/selectivealso/ directory, run 5 | ```bash 6 | php -S localhost:8080 7 | ``` 8 | 9 | Visit `localhost:8080/hello_world.php` and click the button -------------------------------------------------------------------------------- /challenge_0/postscript/moonpatroller/hello_world.txt: -------------------------------------------------------------------------------- 1 | % gs -dBATCH hello_world.ps 2 | (%stderr)(w)file (Hello, World!\n) writestring 3 | -------------------------------------------------------------------------------- /challenge_0/python/Atakyn/c0.py: -------------------------------------------------------------------------------- 1 | # print hello world 2 | print('hello world') 3 | -------------------------------------------------------------------------------- /challenge_0/python/CindyB/src/helloworld.py: -------------------------------------------------------------------------------- 1 | print 'Hello world!' 2 | -------------------------------------------------------------------------------- /challenge_0/python/DTCitron/README.md: -------------------------------------------------------------------------------- 1 | #Hello World 2 | 3 | ##Premise 4 | 5 | - Hello and welcome to our little community! We're glad to have you! 6 | - Your first task is to implement a simple Hello World program in the language of your choice. Happy coding! 7 | 8 | ##Implementation 9 | 10 | - Call `python main.py' from the `src' directory 11 | -------------------------------------------------------------------------------- /challenge_0/python/DTCitron/src/main.py: -------------------------------------------------------------------------------- 1 | def main(): 2 | print 'Hello World!' 3 | 4 | if __name__=='__main__': 5 | main() 6 | -------------------------------------------------------------------------------- /challenge_0/python/DTaylor1986/README.md: -------------------------------------------------------------------------------- 1 | A hello program using the print() function. 2 | -------------------------------------------------------------------------------- /challenge_0/python/DTaylor1986/src.py: -------------------------------------------------------------------------------- 1 | print("Hello Wold!") 2 | -------------------------------------------------------------------------------- /challenge_0/python/Fejolu/src/helloworld.py: -------------------------------------------------------------------------------- 1 | print 'Hello World' -------------------------------------------------------------------------------- /challenge_0/python/Jac08H/README.md: -------------------------------------------------------------------------------- 1 | # Hello world 2 | ###### Python 3.6 3 | 4 | ### 1. Approch to Solving the problem 5 | 6 | Use the built-in 'print' function to print the desired message. 7 | 8 | ### 2. How to compile and run this code 9 | 10 | ``` 11 | $ python3 src/solution.py 12 | ``` 13 | 14 | ### 3. How this program works 15 | 16 | Like a charm. 17 | -------------------------------------------------------------------------------- /challenge_0/python/Jac08H/src/hello_world.py: -------------------------------------------------------------------------------- 1 | print("Hello world") 2 | -------------------------------------------------------------------------------- /challenge_0/python/Loran425/README.md: -------------------------------------------------------------------------------- 1 | #Hello World 2 | 3 | ##Premise 4 | 5 | - Hello and welcome to our little community! We're glad to have you! 6 | - Your first task is to implement a simple Hello World program in the language of your choice. Happy coding! 7 | 8 | ##Implementation 9 | 10 | - To run the code simply run `python main.py` from the `src` directory. -------------------------------------------------------------------------------- /challenge_0/python/Loran425/src/main.py: -------------------------------------------------------------------------------- 1 | __author__ = "Loran425" 2 | 3 | 4 | def hello_world(): 5 | print("Hello World!") 6 | 7 | if __name__ == '__main__': 8 | hello_world() -------------------------------------------------------------------------------- /challenge_0/python/OkraArmband/README.md: -------------------------------------------------------------------------------- 1 | Python file "hello_world.py" prints the phrase "Hello, world!" -------------------------------------------------------------------------------- /challenge_0/python/OkraArmband/src/hello_world.py: -------------------------------------------------------------------------------- 1 | print("Hello, world!") -------------------------------------------------------------------------------- /challenge_0/python/Tursup/Challenge #0.py: -------------------------------------------------------------------------------- 1 | print("Hello World!") 2 | -------------------------------------------------------------------------------- /challenge_0/python/Tursup/README.MD: -------------------------------------------------------------------------------- 1 | Hello world with python 2.7 2 | -------------------------------------------------------------------------------- /challenge_0/python/Zanetti/challenge_0.py: -------------------------------------------------------------------------------- 1 | print("Hello World") 2 | -------------------------------------------------------------------------------- /challenge_0/python/Zjael/README.md: -------------------------------------------------------------------------------- 1 | Challenge 0 - Python 2 | 3 | Basic function that prints - Hello World! 4 | -------------------------------------------------------------------------------- /challenge_0/python/Zjael/src/Python_0.py: -------------------------------------------------------------------------------- 1 | print("Hello World!") 2 | -------------------------------------------------------------------------------- /challenge_0/python/abhiramm7/challenge_0.py: -------------------------------------------------------------------------------- 1 | print('Hello World!') 2 | -------------------------------------------------------------------------------- /challenge_0/python/acronymcreations/src/hello.py: -------------------------------------------------------------------------------- 1 | print 'hello world' 2 | -------------------------------------------------------------------------------- /challenge_0/python/ajschrier/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 0 - Hello World 2 | 3 | This one's pretty straightforward. Hello World is printed to the console. -------------------------------------------------------------------------------- /challenge_0/python/ajschrier/challenge-0.py: -------------------------------------------------------------------------------- 1 | print "Hello world!" -------------------------------------------------------------------------------- /challenge_0/python/alexmunoz905/main.py: -------------------------------------------------------------------------------- 1 | # AlexMunoz905 | 1/1/17 2 | 3 | print("Hello, world!") 4 | -------------------------------------------------------------------------------- /challenge_0/python/alexmunoz905/readme.md: -------------------------------------------------------------------------------- 1 | # Python AlexMunoz905 #1 2 | --- 3 | Hello, world! in python. just using print. 4 | -------------------------------------------------------------------------------- /challenge_0/python/bryantpq/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 0 2 | FILES: 3 | 1 . hello.py 4 | Prints hello world to the console 5 | -------------------------------------------------------------------------------- /challenge_0/python/bryantpq/hello.py: -------------------------------------------------------------------------------- 1 | print('Hello World!') 2 | -------------------------------------------------------------------------------- /challenge_0/python/carter010/hello_world.py: -------------------------------------------------------------------------------- 1 | # python3 --3.5 2 | print("Hello World!") 3 | -------------------------------------------------------------------------------- /challenge_0/python/dashsten/hello.py: -------------------------------------------------------------------------------- 1 | hello = 'hello world' 2 | print hello 3 | -------------------------------------------------------------------------------- /challenge_0/python/dfdx2/hello.py: -------------------------------------------------------------------------------- 1 | print("Hello World") 2 | -------------------------------------------------------------------------------- /challenge_0/python/dlutsch/README.md: -------------------------------------------------------------------------------- 1 | Amazing program that says hello to the world. Simply incredible. 2 | -------------------------------------------------------------------------------- /challenge_0/python/dlutsch/src/hello_world.py: -------------------------------------------------------------------------------- 1 | print("Hello World!") 2 | -------------------------------------------------------------------------------- /challenge_0/python/dsyost/README.md: -------------------------------------------------------------------------------- 1 | # Challege_0 2 | 3 | ## helloworld.py 4 | 5 | This is a simple hello world writen in python 3! 6 | 7 | Simple print statment that put on the screen "Hello world!" 8 | -------------------------------------------------------------------------------- /challenge_0/python/dsyost/src/helloworld.py: -------------------------------------------------------------------------------- 1 | print("hello world") 2 | -------------------------------------------------------------------------------- /challenge_0/python/flickdm/Readme.md: -------------------------------------------------------------------------------- 1 | # Challenge_0 2 | 3 | Simple Hello_world 4 | 5 | I import print_function because in Python2 print was a statement, whereas 6 | starting in python3 print became a function. This line allows for use in both 7 | versions of python. 8 | -------------------------------------------------------------------------------- /challenge_0/python/flickdm/hello_world.py: -------------------------------------------------------------------------------- 1 | # 2 | # File: hello_world.py 3 | # Author: Douglas Flick 4 | # 2017Challenge_0 5 | 6 | #import print_function for python2.7 support 7 | from __future__ import print_function 8 | 9 | print("Hello World!") 10 | -------------------------------------------------------------------------------- /challenge_0/python/gshooty/hello_world.py: -------------------------------------------------------------------------------- 1 | #it prints out hello world 2 | 3 | print "Hello world" -------------------------------------------------------------------------------- /challenge_0/python/idlepythos/helloWorld.py: -------------------------------------------------------------------------------- 1 | ''' 2 | HelloWorld.py 3 | Goal: Print Hello World 4 | By: Norman Dantzig 5 | 6 | 7 | ''' 8 | 9 | #print Hello World 10 | 11 | print('Hello World') 12 | -------------------------------------------------------------------------------- /challenge_0/python/jcpattison/README.md: -------------------------------------------------------------------------------- 1 | 1. Calls the print function to print "Hello World" 2 | -------------------------------------------------------------------------------- /challenge_0/python/jcpattison/src/HelloWord.py: -------------------------------------------------------------------------------- 1 | 2 | print('Hello World') 3 | -------------------------------------------------------------------------------- /challenge_0/python/kar-moore/README.md: -------------------------------------------------------------------------------- 1 | hello! -------------------------------------------------------------------------------- /challenge_0/python/kar-moore/src/hello_world.py: -------------------------------------------------------------------------------- 1 | print("Hello World") -------------------------------------------------------------------------------- /challenge_0/python/kokimame/README.md: -------------------------------------------------------------------------------- 1 | Hello World in Python 3.5.1. 2 | -------------------------------------------------------------------------------- /challenge_0/python/kokimame/helloworld.py: -------------------------------------------------------------------------------- 1 | print("Hello World") 2 | -------------------------------------------------------------------------------- /challenge_0/python/lepmets/README.md: -------------------------------------------------------------------------------- 1 | Challenge #0 in Python 2 | -------------------------------------------------------------------------------- /challenge_0/python/lepmets/src/challenge_0.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/python3 2 | """Challenge #0 in Python.""" 3 | # coding: utf-8 4 | 5 | print('Hello, World!') 6 | -------------------------------------------------------------------------------- /challenge_0/python/lex32pem/challenge_0.py: -------------------------------------------------------------------------------- 1 | message = "Hello World!" 2 | print (message) -------------------------------------------------------------------------------- /challenge_0/python/lex32pem/readme.md: -------------------------------------------------------------------------------- 1 | Hello world with python 3.4 2 | -------------------------------------------------------------------------------- /challenge_0/python/mindm/README.md: -------------------------------------------------------------------------------- 1 | # Challenge_0 2 | ## Hello World 3 | According to Wikipedia 4 | > A "Hello, World!" program is a computer program that outputs or displays "Hello, World!" to the user. 5 | And that is precisely what this program does. 6 | 7 | You can run it by typing the following on your command line: 8 | ``` 9 | $ python3 hello.py 10 | ``` 11 | 12 | -------------------------------------------------------------------------------- /challenge_0/python/mindm/src/hello.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | print("Hello, World!") 5 | 6 | -------------------------------------------------------------------------------- /challenge_0/python/mindovermiles262/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 000 2 | A simple program to write hello world. 3 | 4 | To run: Naviage to directory using command prompt using cd and ls 5 | Type "python challenge_00.py" -------------------------------------------------------------------------------- /challenge_0/python/mindovermiles262/src/challenge_00.py: -------------------------------------------------------------------------------- 1 | print("Hello, World") -------------------------------------------------------------------------------- /challenge_0/python/mjuiuc/README.md: -------------------------------------------------------------------------------- 1 | #My solution to Hello World 2 | 3 | - The solution in python is easy as py ;) 4 | -------------------------------------------------------------------------------- /challenge_0/python/mjuiuc/helloworld.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | 4 | print "Hello World" 5 | -------------------------------------------------------------------------------- /challenge_0/python/nebi/README.md: -------------------------------------------------------------------------------- 1 | A python 3.6 program that print "Hello World!" 2 | -------------------------------------------------------------------------------- /challenge_0/python/nebi/src/hello.py: -------------------------------------------------------------------------------- 1 | """Print Hello World!.""" 2 | print("Hello World!") 3 | -------------------------------------------------------------------------------- /challenge_0/python/ning/challenge_0.py: -------------------------------------------------------------------------------- 1 | print('Hello World!') 2 | -------------------------------------------------------------------------------- /challenge_0/python/noirchrome/helloworld.py: -------------------------------------------------------------------------------- 1 | " Prints Hello World! to the console " 2 | print("Hello World!") 3 | -------------------------------------------------------------------------------- /challenge_0/python/paper-squares/helloworld.py: -------------------------------------------------------------------------------- 1 | print 'Hello World' 2 | -------------------------------------------------------------------------------- /challenge_0/python/phil-harmoniq/challenge_0.py: -------------------------------------------------------------------------------- 1 | print('Hello, world!') 2 | -------------------------------------------------------------------------------- /challenge_0/python/polar/README.md: -------------------------------------------------------------------------------- 1 | The print function will write to the console (shell). In this case, the print command is being fulfilled with a string "Hello World!". -------------------------------------------------------------------------------- /challenge_0/python/polar/src/helloWorld.py: -------------------------------------------------------------------------------- 1 | print("Hello World!") 2 | -------------------------------------------------------------------------------- /challenge_0/python/popcorn_anachronism/challenge_0.py: -------------------------------------------------------------------------------- 1 | print("hello world!") 2 | -------------------------------------------------------------------------------- /challenge_0/python/popcorn_anachronism/readme.md: -------------------------------------------------------------------------------- 1 | hello world! using python 3 2 | -------------------------------------------------------------------------------- /challenge_0/python/psonghi/README.md: -------------------------------------------------------------------------------- 1 | #Challenge 0 2 | 3 | ##Hello world 4 | 5 | prints hello world. 6 | -------------------------------------------------------------------------------- /challenge_0/python/psonghi/src/helloworld.py: -------------------------------------------------------------------------------- 1 | from __future__ import print_function 2 | 3 | print("Hello, world!") 4 | -------------------------------------------------------------------------------- /challenge_0/python/returnlove/README.md: -------------------------------------------------------------------------------- 1 | hello world. 2 | 3 | run: 4 | python helloworld.py -------------------------------------------------------------------------------- /challenge_0/python/returnlove/src/helloworld.py: -------------------------------------------------------------------------------- 1 | print("Hello World!") -------------------------------------------------------------------------------- /challenge_0/python/sarcodian/src/challenge_0.py: -------------------------------------------------------------------------------- 1 | print('Hello World') -------------------------------------------------------------------------------- /challenge_0/python/shaowen/helloworld.py: -------------------------------------------------------------------------------- 1 | """ 2 | Created on Tue Jan 3 13:20:15 2017 3 | Python 2.7 4 | @author: shaowen liu 5 | 6 | """ 7 | 8 | print 'hello world' -------------------------------------------------------------------------------- /challenge_0/python/slandau/README.md: -------------------------------------------------------------------------------- 1 | Challenge 0 in python by Steven Landau 2 | -------------------------------------------------------------------------------- /challenge_0/python/slandau/hello_world.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | if __name__ == '__main__': 4 | print('Hello World!') 5 | -------------------------------------------------------------------------------- /challenge_0/python/slansford/README.md: -------------------------------------------------------------------------------- 1 | #Prints Hello World! 2 | #Looking forward to these challenges! -------------------------------------------------------------------------------- /challenge_0/python/slansford/src/challenge_0.py: -------------------------------------------------------------------------------- 1 | #prints Hello World! 2 | 3 | print("Hello World!") -------------------------------------------------------------------------------- /challenge_0/python/slickness/Challenge_0.py: -------------------------------------------------------------------------------- 1 | print ("Hello World!") 2 | 3 | -------------------------------------------------------------------------------- /challenge_0/python/slickness/README.MD: -------------------------------------------------------------------------------- 1 | Hello world with python 3.5 2 | -------------------------------------------------------------------------------- /challenge_0/python/sten: -------------------------------------------------------------------------------- 1 | hello = 'Hello World' 2 | print hello 3 | -------------------------------------------------------------------------------- /challenge_0/python/sysek/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 0 2 | ###### Python 3.6 3 | ### 1. Approch to solving the problem 4 | First challenge is to print 'hello world' in language 5 | 6 | ### 2. How to run this code? 7 | ``` 8 | $ python3 src/hello.py 9 | ``` 10 | ### 3. How this program works? 11 | Print 'hello world' on the screen 12 | -------------------------------------------------------------------------------- /challenge_0/python/sysek/src/hello.py: -------------------------------------------------------------------------------- 1 | print('hello world!') 2 | -------------------------------------------------------------------------------- /challenge_0/python/system123/README.md: -------------------------------------------------------------------------------- 1 | Python 3 - Hello World 2 | 3 | Run with: ./challenge0.py -------------------------------------------------------------------------------- /challenge_0/python/system123/challenge0.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | print("Hello World!") 4 | -------------------------------------------------------------------------------- /challenge_0/python/tavery321/README.md: -------------------------------------------------------------------------------- 1 | A program written in python which prints "Hello World" 2 | -------------------------------------------------------------------------------- /challenge_0/python/tavery321/src/c0.py: -------------------------------------------------------------------------------- 1 | print("Hello World") 2 | 3 | -------------------------------------------------------------------------------- /challenge_0/python/thereluctantloser/README.txt: -------------------------------------------------------------------------------- 1 | The print command was used to print "Hello World". -------------------------------------------------------------------------------- /challenge_0/python/thereluctantloser/src/challenge0.py: -------------------------------------------------------------------------------- 1 | #! python 3 2 | # challenge0.py will display "Hello World!" to your screen 3 | 4 | print('Hello World!') -------------------------------------------------------------------------------- /challenge_0/python/tvanderwal/README.md: -------------------------------------------------------------------------------- 1 | challenge_0.py 2 | 3 | use: Prints 'Hello World!' to the console -------------------------------------------------------------------------------- /challenge_0/python/tvanderwal/src/challenge_0.py: -------------------------------------------------------------------------------- 1 | print('Hello World!') -------------------------------------------------------------------------------- /challenge_0/python/ukirderohit/helloworld.py: -------------------------------------------------------------------------------- 1 | print("Hello, World") 2 | -------------------------------------------------------------------------------- /challenge_0/python/walkingluo/README.md: -------------------------------------------------------------------------------- 1 | ## Challenge_0 2 | 3 | - Print Hello World -------------------------------------------------------------------------------- /challenge_0/python/walkingluo/src/hello_world.py: -------------------------------------------------------------------------------- 1 | # 2 | # Print Hello World 3 | # 4 | 5 | 6 | def print_hello_world(): 7 | print("Hello World") 8 | 9 | 10 | if __name__ == '__main__': 11 | print_hello_world() 12 | -------------------------------------------------------------------------------- /challenge_0/python/whiterd/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YearOfProgramming/2017Challenges/a8f556f1d5b43c099a0394384c8bc2d826f9d287/challenge_0/python/whiterd/README.md -------------------------------------------------------------------------------- /challenge_0/python/whiterd/src/hello_world.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from __future__ import print_function 4 | 5 | print('Hello World!') 6 | -------------------------------------------------------------------------------- /challenge_0/python/wobboz/README.md: -------------------------------------------------------------------------------- 1 | Challenge 0 2 | 3 | Challenge Name: Hello World 4 | 5 | 6 | 1. Approach to Solving the Problem: 7 | Printed to standard output 8 | 9 | 2. How to Compile and Run This Code: 10 | Only one step to make this program work from my folder 11 | $ python src/HelloWorld.py 12 | 13 | 3. How this program works: 14 | The file HelloWorld prints "Hello World" to standard out 15 | -------------------------------------------------------------------------------- /challenge_0/python/wobboz/src/HelloWorld.py: -------------------------------------------------------------------------------- 1 | print("Hello World") -------------------------------------------------------------------------------- /challenge_0/python/wost/README.md: -------------------------------------------------------------------------------- 1 | Hello World in Python 3.6! 2 | -------------------------------------------------------------------------------- /challenge_0/python/wost/main.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Written in Python 3.6 3 | ''' 4 | 5 | def main(text): 6 | print(f"Hello world, additional text: {text}") 7 | 8 | if __name__ == "__main__": 9 | main(input("What would you like to say?")) 10 | -------------------------------------------------------------------------------- /challenge_0/python/zooks97/README.md: -------------------------------------------------------------------------------- 1 | ## Run 2 | Use python 3.5+ 3 | e.x. $python3 helloWorld.py 4 | 5 | ## Explanation 6 | Uses the print function to print "Hello, World!" then a new line. 7 | -------------------------------------------------------------------------------- /challenge_0/python/zooks97/src/helloWorld.py: -------------------------------------------------------------------------------- 1 | print("Hello, World!") #print hello world statement 2 | -------------------------------------------------------------------------------- /challenge_0/r/aev1tas/HelloWorld.R: -------------------------------------------------------------------------------- 1 | "Hello World" 2 | 3 | #thats it lol 4 | -------------------------------------------------------------------------------- /challenge_0/ruby/ConorWright/README.md: -------------------------------------------------------------------------------- 1 | Make sure you have ruby installed. 2 | 3 | run with ./hello_world.rb 4 | -------------------------------------------------------------------------------- /challenge_0/ruby/ConorWright/hello_world.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby 2 | 3 | puts "Hello World!" 4 | -------------------------------------------------------------------------------- /challenge_0/rust/deg4uss3r/challenge_0/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "challenge_0" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_0/rust/deg4uss3r/challenge_0/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "challenge_0" 3 | version = "0.1.0" 4 | authors = ["Ricky - degausser"] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_0/rust/deg4uss3r/challenge_0/README.md: -------------------------------------------------------------------------------- 1 | # Rust is awesome! 2 | 3 | ## To run 4 | simply execute `challenge_0` and it will print Hello, world! 5 | -------------------------------------------------------------------------------- /challenge_0/rust/deg4uss3r/challenge_0/challenge_0: -------------------------------------------------------------------------------- 1 | ./target/release/challenge_0 -------------------------------------------------------------------------------- /challenge_0/rust/deg4uss3r/challenge_0/src/main.rs: -------------------------------------------------------------------------------- 1 | //lol jsut initalize with `cargo new "./repo_name" --bin`! 2 | 3 | fn main() { 4 | println!("Hello, world!"); 5 | } 6 | -------------------------------------------------------------------------------- /challenge_0/rust/josephpd3/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | -------------------------------------------------------------------------------- /challenge_0/rust/josephpd3/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "josephpd3" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_0/rust/josephpd3/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "josephpd3" 3 | version = "0.1.0" 4 | authors = ["Joseph P DeBartola III "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_0/rust/makernaren/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "hello_world" 3 | version = "0.0.1" 4 | 5 | -------------------------------------------------------------------------------- /challenge_0/rust/makernaren/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | 3 | name = "hello_world" 4 | version = "0.0.1" 5 | authors = [ "naren " ] -------------------------------------------------------------------------------- /challenge_0/rust/makernaren/README.md: -------------------------------------------------------------------------------- 1 | ## Hello world! 2 | #### To run the code : 3 | * Install [rustlang](https://www.rust-lang.org/en-US/install.html) 4 | * Open this directory in terminal and run `cargo run` to compile and run the code. 5 | ``` 6 | $ cargo run 7 | Hello, world! 8 | ``` -------------------------------------------------------------------------------- /challenge_0/rust/makernaren/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | println!("Hello, world!"); 3 | } -------------------------------------------------------------------------------- /challenge_0/rust/myrrlyn/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "myrrlyn" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_0/rust/myrrlyn/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "myrrlyn" 3 | version = "0.1.0" 4 | authors = ["myrrlyn "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_0/rust/myrrlyn/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | println!("Hello, world!"); 3 | } 4 | -------------------------------------------------------------------------------- /challenge_0/scala/ndsmith3/HelloWorld.scala: -------------------------------------------------------------------------------- 1 | object HelloWorld extends App { 2 | println("Hello, World!") 3 | } 4 | -------------------------------------------------------------------------------- /challenge_0/swift/garytate/challenge_0.swift: -------------------------------------------------------------------------------- 1 | print("Hello World! Challenge 0 by Gary Tate") 2 | -------------------------------------------------------------------------------- /challenge_0/swift/stevenr12/HelloWorld.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | print("Hello, world!") 4 | -------------------------------------------------------------------------------- /challenge_0/x86/x95/README.md: -------------------------------------------------------------------------------- 1 | #Hello World in x86 Assembly(32-Bit) 2 | 3 | ##Compiling 4 | 5 | as helloworld.s -o helloworld.o 6 | ld helloworld.o -o helloworld 7 | 8 | tested on Ubuntu 16.04 64-Bit 9 | -------------------------------------------------------------------------------- /challenge_0/x86/x95/src/helloworld.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global _start 3 | _start: 4 | 5 | mov $4,%eax 6 | mov $1,%ebx 7 | mov $message,%ecx 8 | mov $13,%edx 9 | int $0x80 10 | 11 | 12 | movl $1,%eax 13 | movl $0x0, %ebx 14 | int $0x80 15 | 16 | .data 17 | 18 | message: 19 | .ascii "Hello World!\n" 20 | -------------------------------------------------------------------------------- /challenge_1/Julia/DTCitron/src/reverse.jl: -------------------------------------------------------------------------------- 1 | input_string = join(ARGS, " ") 2 | println(input_string[end:-1:1]) 3 | -------------------------------------------------------------------------------- /challenge_1/bash/deku-jacktraf/Readme.md: -------------------------------------------------------------------------------- 1 | Run like so ./reverse-string.sh [STRING] 2 | - Where [STRING] is the string you want reversed 3 | - No need for []'s around your string btw, thats just how arguments are listed in man pages 4 | Make sure the file is set to be executable: 5 | If using a linux system, type: 6 | chmod +x ./reverse-string.sh 7 | -------------------------------------------------------------------------------- /challenge_1/c/boilerup_brian/README.md: -------------------------------------------------------------------------------- 1 | ##COMPILE 2 | On a *nix system with gcc, run 3 | $gcc stringreverse.c -o stringreverse 4 | 5 | ##Run 6 | $./stringreverse YOUR_STRING 7 | 8 | ##EXPLANATION 9 | Program takes the string to be reversed as a 10 | command line argument. If your string has spaces, use quotes. 11 | The program only takes a single argument. 12 | -------------------------------------------------------------------------------- /challenge_1/c/boilerup_brian/src/stringreverse: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YearOfProgramming/2017Challenges/a8f556f1d5b43c099a0394384c8bc2d826f9d287/challenge_1/c/boilerup_brian/src/stringreverse -------------------------------------------------------------------------------- /challenge_1/c/jrtn/reverse_string.c: -------------------------------------------------------------------------------- 1 | #include 2 | void inplace_reverse(char *str) { 3 | size_t len = strlen(str); 4 | int i; 5 | for(i = 0; i < len / 2; i++) { 6 | char temp; 7 | temp = str[len - 1 - i]; 8 | str[len - 1 - i] = str[i]; 9 | str[i] = temp; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /challenge_1/c/kmaitski/reverse_string.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void reverse_string(char *str) 5 | { 6 | int x = strlen(str); 7 | while (x >= 0) 8 | { 9 | printf("%c", str[x]); 10 | x--; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /challenge_1/c/nasciiboy/Makefile: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | SRCDIR = src 3 | OUTPUT = reverseString 4 | RM = rm 5 | 6 | all: $(SRCDIR)/main.c 7 | $(CC) -g -Wall -o $(OUTPUT) $(SRCDIR)/*.c 8 | 9 | clean: 10 | $(RM) $(OUTPUT) 11 | -------------------------------------------------------------------------------- /challenge_1/c/nasciiboy/README.md: -------------------------------------------------------------------------------- 1 | # Reverse String 2 | 3 | reverse a string for any given string input and print the result in stdout. 4 | 5 | ## Building 6 | 7 | ``` bash 8 | make 9 | ``` 10 | 11 | ## Running 12 | 13 | ``` bash 14 | ./reverseString "Hello World" 15 | ``` 16 | 17 | ## Cleanup 18 | 19 | ``` bash 20 | make clean 21 | ``` 22 | -------------------------------------------------------------------------------- /challenge_1/c/nasciiboy/src/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void reverseString( char *str ){ 4 | if( *str ){ 5 | reverseString( str + 1 ); 6 | putchar( *str ); 7 | } 8 | } 9 | 10 | int main( int argc, char *argv[] ){ 11 | if( argc == 1 ) return 1; 12 | 13 | reverseString( argv[ 1 ] ); 14 | putchar( '\n' ); 15 | 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /challenge_1/c/scottsquatch/Makefile: -------------------------------------------------------------------------------- 1 | SRCDIR=src 2 | OUTDIR=bin 3 | APPNAME=reverse_string 4 | RM=rm -rf 5 | 6 | all: $(SRCDIR)/* 7 | mkdir -p $(OUTDIR) 8 | gcc -g -Wall -o $(OUTDIR)/$(APPNAME) $(SRCDIR)/* 9 | 10 | clean: 11 | $(RM) $(OUTDIR)/* 12 | -------------------------------------------------------------------------------- /challenge_1/c/scottsquatch/README.md: -------------------------------------------------------------------------------- 1 | # Reverse a String 2 | Application which reverses a string. 3 | ## Building 4 | ``` bash 5 | make 6 | ``` 7 | 8 | ## Running 9 | ``` bash 10 | ./reverse_string 11 | ``` 12 | 13 | ## Cleanup 14 | ``` bash 15 | make clean 16 | ``` 17 | -------------------------------------------------------------------------------- /challenge_1/c/tyleroar/README.md: -------------------------------------------------------------------------------- 1 | String reversing in C 2 | -------------------------------------------------------------------------------- /challenge_1/c/woser/README.md: -------------------------------------------------------------------------------- 1 | # Reverse a string 2 | Application for string reversal. 3 | 4 | ## Compile and Run 5 | $gcc string_reverse.c -o 'output.exe' && ./'outputfile' 6 | 7 | ## Explanation 8 | Takes string as in-code input and reverses it using two pointers, printing reversed string on console. -------------------------------------------------------------------------------- /challenge_1/c/zooks97/README.md: -------------------------------------------------------------------------------- 1 | ## Compile 2 | On a *nix system with gcc, run 3 | $gcc reverseInput.c -o 'output.file' 4 | 5 | ## Run 6 | $./'output.file' 7 | 8 | ## Explanation 9 | This c program uses putchar and getchar from the stdio header to reverse inputted text. 10 | Each inputted character before an EOF (ctrl+d in most terminals) is put onto a stack. 11 | Characters are then put back out from the top of the stack down. 12 | -------------------------------------------------------------------------------- /challenge_1/coffeescript/kedarbramhe/coffeescripts/reverse.coffee: -------------------------------------------------------------------------------- 1 | reverse = (s) -> 2 | if s.length < 2 then s else reverse(s[1..-1]) + s[0] 3 | 4 | s = "HelloWorld" 5 | console.log "s=#{s}, s.reverse=#{reverse(s)}" 6 | -------------------------------------------------------------------------------- /challenge_1/cpp/alexbotello/README.md: -------------------------------------------------------------------------------- 1 | # Reverse String 2 | ###### Language Version (C++ 11) 3 | 4 | We use a For loop to iterate through the string starting at the last element. 5 | At each element print the output. 6 | -------------------------------------------------------------------------------- /challenge_1/cpp/alexbotello/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | 5 | int main() 6 | { 7 | string input; 8 | 9 | cout << ">: "; 10 | getline(cin, input); 11 | 12 | for (int i = input.length(); i >= 0; i--) 13 | { 14 | cout << input[i]; 15 | } 16 | cout << endl; 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /challenge_1/cpp/blakebarnes00/Makefile: -------------------------------------------------------------------------------- 1 | CXX = g++ 2 | FLG = -w -std=c++11 3 | EXE = ReversedString 4 | 5 | all: 6 | $(CXX) $(FLG) -o $(EXE) main.cpp 7 | 8 | clean: 9 | -rm $(EXE) 10 | -------------------------------------------------------------------------------- /challenge_1/cpp/chowey/readme.md: -------------------------------------------------------------------------------- 1 | The program will take in user input and reverse that string each time it runs. -------------------------------------------------------------------------------- /challenge_1/cpp/flickdm/Readme.md: -------------------------------------------------------------------------------- 1 | # Challenge 1 2 | 3 | We interate over half the length of the string and swap the characters for start 4 | and end and move inwards. 5 | -------------------------------------------------------------------------------- /challenge_1/cpp/manuel/README.md: -------------------------------------------------------------------------------- 1 | # String Reversal 2 | 3 | This program will take a single line through standard input and output that line reversed through standard output. 4 | 5 | To compile: 6 | 7 | make 8 | 9 | To clean: 10 | 11 | make clean 12 | 13 | -------------------------------------------------------------------------------- /challenge_1/cpp/manuel/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char **argv) { 5 | 6 | std::string input; 7 | std::getline(std::cin, input); 8 | 9 | for (int i = input.length() - 1; i >= 0; i--) { 10 | std::cout << input[i]; 11 | } 12 | std::cout << std::endl; 13 | 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /challenge_1/cpp/rbrt/README.md: -------------------------------------------------------------------------------- 1 | The code works using inky the iostream library. 2 | It works for input from the command line (multiple strings) 3 | as well as run time input (single string). -------------------------------------------------------------------------------- /challenge_1/cpp/sven/src/Reverse.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) 5 | { 6 | for (int i = argc - 1; i > 0; --i) 7 | { 8 | std::string word = argv[i]; 9 | for (std::string::reverse_iterator rit = word.rbegin(); rit != word.rend(); ++rit) 10 | std::cout << *rit; 11 | std::cout << " "; 12 | } 13 | std::cout << std::endl; 14 | return 0; 15 | } -------------------------------------------------------------------------------- /challenge_1/csharp/bdoner/esrever.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | class Reverse { 4 | 5 | static void Main() { 6 | var hello = "Hello!"; 7 | for(var i = hello.Length - 1; i >= 0; i--) { 8 | Console.Write(hello[i]); 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /challenge_1/csharp/sven/src/Reverse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace Challenge_1 5 | { 6 | class Program 7 | { 8 | static void Main(string[] args) 9 | { 10 | Console.WriteLine( 11 | args.Aggregate("", (sentence, word) => word.Aggregate("", (w, character) => character + w) + " " + sentence) 12 | ); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /challenge_1/elixir/csuzw/README.md: -------------------------------------------------------------------------------- 1 | # Reverse a string 2 | 3 | ## Build and Run 4 | 5 | * `mix deps.get` 6 | * `iex -S mix` 7 | * `Reverse.string "Hello"` 8 | 9 | ## Tests 10 | 11 | * `mix test` 12 | 13 | ## Documentation 14 | 15 | * `mix docs` 16 | * Open `./doc/index.html` -------------------------------------------------------------------------------- /challenge_1/elixir/csuzw/src/mix.lock: -------------------------------------------------------------------------------- 1 | %{"earmark": {:hex, :earmark, "1.1.1", "433136b7f2e99cde88b745b3a0cfc3fbc81fe58b918a09b40fce7f00db4d8187", [:mix], []}, 2 | "ex_doc": {:hex, :ex_doc, "0.14.5", "c0433c8117e948404d93ca69411dd575ec6be39b47802e81ca8d91017a0cf83c", [:mix], [{:earmark, "~> 1.0", [hex: :earmark, optional: false]}]}} 3 | -------------------------------------------------------------------------------- /challenge_1/elixir/csuzw/src/test/reverse_test.exs: -------------------------------------------------------------------------------- 1 | defmodule ReverseTest do 2 | use ExUnit.Case 3 | doctest Reverse 4 | end 5 | -------------------------------------------------------------------------------- /challenge_1/elixir/csuzw/src/test/test_helper.exs: -------------------------------------------------------------------------------- 1 | ExUnit.start() 2 | -------------------------------------------------------------------------------- /challenge_1/elixir/joegotflow83/reverse/lib/reverse.ex: -------------------------------------------------------------------------------- 1 | defmodule Reverse do 2 | def reverse_string(input) do 3 | String.reverse input 4 | end 5 | end 6 | 7 | -------------------------------------------------------------------------------- /challenge_1/elixir/joegotflow83/reverse/test/reverse_test.exs: -------------------------------------------------------------------------------- 1 | defmodule ReverseTest do 2 | use ExUnit.Case 3 | doctest Reverse 4 | 5 | test "input is reversed" do 6 | assert Reverse.reverse_string("joe") == "eoj" 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /challenge_1/elixir/joegotflow83/reverse/test/test_helper.exs: -------------------------------------------------------------------------------- 1 | ExUnit.start() 2 | -------------------------------------------------------------------------------- /challenge_1/go/erocs/reverse.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func ReverseString(s string) string { 8 | l := len(s) 9 | r := make([]rune, l) 10 | l-- 11 | for i, ch := range s { 12 | r[l-i] = ch 13 | } 14 | return string(r) 15 | } 16 | 17 | func main() { 18 | orig := "hello" 19 | fmt.Printf("%s reversed is %s\n", orig, ReverseString(orig)) 20 | } 21 | -------------------------------------------------------------------------------- /challenge_1/go/igniteflow/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | $ go run src/challenge_1.go 3 | easy as abc 4 | cba sa ysae 5 | ``` 6 | -------------------------------------------------------------------------------- /challenge_1/go/natdm/reverse.go: -------------------------------------------------------------------------------- 1 | package natdm 2 | 3 | func reverse(s string) string { 4 | r := make([]byte, len(s)) 5 | for i := range []byte(s) { 6 | r[i] = s[(len(s)-1)-i] 7 | } 8 | return string(r) 9 | } 10 | -------------------------------------------------------------------------------- /challenge_1/go/natdm/reverse_test.go: -------------------------------------------------------------------------------- 1 | package natdm 2 | 3 | import "testing" 4 | 5 | func TestReverse(t *testing.T) { 6 | exp := "dlrow olleh" 7 | if actual := reverse("hello world"); actual != exp { 8 | t.Errorf("expected %s, got %s", exp, actual) 9 | t.Fail() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /challenge_1/go/rchicoli/reverse.go: -------------------------------------------------------------------------------- 1 | package rchicoli 2 | 3 | // ReverseString reverses a string 4 | func ReverseString(s string) string { 5 | unicodeString := []int32(s) 6 | l := len(unicodeString) 7 | r := make([]int32, l) 8 | l-- 9 | for k, v := range unicodeString { 10 | r[l-k] = v 11 | } 12 | return string(r) 13 | } 14 | -------------------------------------------------------------------------------- /challenge_1/go/rchicoli/reverse_test.go: -------------------------------------------------------------------------------- 1 | package rchicoli 2 | 3 | import "testing" 4 | 5 | func TestReverse(t *testing.T) { 6 | expected := "héllö yöü" 7 | if output := ReverseString("üöy ölléh"); output != expected { 8 | t.Errorf("given str=\"%s\", return \"%s\"", expected, output) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /challenge_1/go/shivams/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | go run reverse.go 3 | Enter the string 4 | Get the reverse output 5 | ``` -------------------------------------------------------------------------------- /challenge_1/go/tml/README.md: -------------------------------------------------------------------------------- 1 | # golang: Reverse a string 2 | 3 | ## My thought process 4 | I don't want to do it in bytes - I want to use the runes support in golang 5 | Tried the unicode normalization package, didn't really seem to make anything easier 6 | http://devs.cloudimmunity.com/gotchas-and-common-mistakes-in-go-golang/ looks useful -------------------------------------------------------------------------------- /challenge_1/haskell/halogenandtoast/README.md: -------------------------------------------------------------------------------- 1 | To run simply use `runhaskell` like so: 2 | 3 | `runhaskell src/Main.hs STRING` 4 | -------------------------------------------------------------------------------- /challenge_1/haskell/halogenandtoast/src/Main.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import System.Environment(getArgs) 4 | import Data.List(reverse) 5 | 6 | main :: IO () 7 | main = do 8 | args <- getArgs 9 | case args of 10 | (x:_) -> putStrLn $ reverse x 11 | _ -> putStrLn "Usage: runhaskell Main.hs STRING" 12 | -------------------------------------------------------------------------------- /challenge_1/java/Leigh/ReverseString.java: -------------------------------------------------------------------------------- 1 | 2 | public class ReverseString { 3 | public static void main (String... args) { 4 | System.out.println(new StringBuilder(args[0]).reverse()); 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /challenge_1/java/togden/README.md: -------------------------------------------------------------------------------- 1 | To run this project, open your command prompt and navigate to the "build" directory. Then write "java Reversal 'text I want reversed'". Simple as that :) -------------------------------------------------------------------------------- /challenge_1/java/togden/src/Reversal.java: -------------------------------------------------------------------------------- 1 | public class Reversal { 2 | public static void main(String[] args) { 3 | System.out.println(reverse(args[0])); 4 | } 5 | 6 | private static String reverse(String input) { 7 | String reversed = ""; 8 | for(int i = 0; i 2 | 3 | 4 | 5 | Challenge_1|YoP 2017 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /challenge_1/javascript/collinperkins/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /challenge_1/javascript/collinperkins/readme.md: -------------------------------------------------------------------------------- 1 | Open the html file in chrome. 2 | Right click and click inspect in menu. 3 | Click on the console tab to view results. 4 | -------------------------------------------------------------------------------- /challenge_1/javascript/collinperkins/reverse.js: -------------------------------------------------------------------------------- 1 | var notReversed = prompt('Please enter a string you would like reversed!'); 2 | var reversed = notReversed.split('').reverse().join(''); 3 | 4 | console.log(reversed); 5 | -------------------------------------------------------------------------------- /challenge_1/javascript/raijinn/README.md: -------------------------------------------------------------------------------- 1 | Goal: Reverse given string. 2 | -------------------------------------------------------------------------------- /challenge_1/javascript/raijinn/src/challenge_1.js: -------------------------------------------------------------------------------- 1 | function reverseString(string) { 2 | var arr = string.split(''); 3 | arr.reverse(); 4 | return arr.join(''); 5 | } 6 | -------------------------------------------------------------------------------- /challenge_1/javascript/rawphs/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 1: Reverse a string 2 | 3 | ## Usage 4 | 5 | On your terminal, run: 6 | 7 | `$ node index.js ` -------------------------------------------------------------------------------- /challenge_1/javascript/rawphs/src/index.js: -------------------------------------------------------------------------------- 1 | function reverseString (string) { 2 | return string.split('').reverse().join('') 3 | } 4 | 5 | console.log(reverseString(process.argv[2])) 6 | -------------------------------------------------------------------------------- /challenge_1/php/jarydremillard/challenge_1.php: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /challenge_1/python/Atakyn/c1.py: -------------------------------------------------------------------------------- 1 | # reverse a string 2 | def reverse_string(string): 3 | return string[::-1] 4 | -------------------------------------------------------------------------------- /challenge_1/python/CindyB/src/reverse_string.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | def reverseString(myInput): 4 | if not myInput: 5 | return None 6 | 7 | returnValue = "" 8 | for letter in myInput: 9 | returnValue = letter + returnValue 10 | 11 | return returnValue 12 | 13 | if len(sys.argv) >= 2: 14 | print reverseString(sys.argv[1]) 15 | -------------------------------------------------------------------------------- /challenge_1/python/DTCitron/src/main.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | if __name__ == "__main__": 4 | # Read in all inputs 5 | input = sys.argv[1:] 6 | # Join list of inputs into a string 7 | input_string = " ".join(input) 8 | # Reverse now 9 | reverse_string = input_string[::-1] 10 | # Print 11 | print reverse_string 12 | -------------------------------------------------------------------------------- /challenge_1/python/DakRomo/Challenge_1: -------------------------------------------------------------------------------- 1 | s = 'Jon' 2 | print s 3 | s = s[-1::-1] 4 | print s -------------------------------------------------------------------------------- /challenge_1/python/Jac08H/README.md: -------------------------------------------------------------------------------- 1 | # Reverse a String 2 | 3 | ### 1. Approach to Solving the Problem 4 | 5 | Use list slicing to reverse the string. 6 | 7 | ### 2. How to compile and run this code 8 | 9 | ``` 10 | $ python3 src/solution.py 11 | ``` 12 | 13 | ### 3. How this program works 14 | 15 | Enter the string you want to reverse. 16 | -------------------------------------------------------------------------------- /challenge_1/python/Jac08H/src/solution.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | str = input() 4 | print(str[::-1]) 5 | -------------------------------------------------------------------------------- /challenge_1/python/Loran425/src/main.py: -------------------------------------------------------------------------------- 1 | __author__ = "Loran425" 2 | 3 | 4 | def backwards(string): 5 | return string[::-1] 6 | 7 | 8 | if __name__ == '__main__': 9 | print(backwards("Hello World!")) 10 | -------------------------------------------------------------------------------- /challenge_1/python/MicalV/main.py: -------------------------------------------------------------------------------- 1 | def reverseStr(string): 2 | y = len(string) 3 | charList = [] 4 | for x in range(y): 5 | charList.insert(0,string[x]) 6 | for z in range(y): 7 | print(charList[z], end="") 8 | 9 | reverseStr("Testing testing 1 2 3") -------------------------------------------------------------------------------- /challenge_1/python/OkraArmband/README.md: -------------------------------------------------------------------------------- 1 | Python file "hello_world.py" defines function reverse(), where reverse(string) will return the string in reverse. 2 | 3 | For example, reverse("Hello World!") will return "!dlroW olleH" 4 | This can be used to print as such: print(reverse("Hello World!")) -------------------------------------------------------------------------------- /challenge_1/python/OkraArmband/src/reverse.py: -------------------------------------------------------------------------------- 1 | def reverse(arg): 2 | return arg[::-1] -------------------------------------------------------------------------------- /challenge_1/python/abhiramm7/challenge_1.py: -------------------------------------------------------------------------------- 1 | def string_reversal(string): 2 | # string[begin:end:stride] 3 | # stride -1 reverses string 4 | return string[::-1] 5 | 6 | if __name__ == "__main__": 7 | print string_reversal('Hello') 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /challenge_1/python/acronymcreations/src/challenge1.py: -------------------------------------------------------------------------------- 1 | def reverse(str): 2 | if len(str) == 1: 3 | return str 4 | else: 5 | return reverse(str[1:]) + str[:1] 6 | -------------------------------------------------------------------------------- /challenge_1/python/ajschrier/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 1 - Reverse a String 2 | 3 | Used string step set to -1 to print string in reverse. -------------------------------------------------------------------------------- /challenge_1/python/ajschrier/challenge_1.py: -------------------------------------------------------------------------------- 1 | # Reverse a string 2 | 3 | s = 'hello' 4 | 5 | print s[::-1] 6 | -------------------------------------------------------------------------------- /challenge_1/python/alexbotello/README.md: -------------------------------------------------------------------------------- 1 | # Reverse a String 2 | ###### Language Version (Python 3.6.0) 3 | 4 | ### Compile 5 | 6 | ``` 7 | python main.py 8 | ``` 9 | 10 | ### How to use 11 | 12 | Enter your chosen phrase into command shell once program is running 13 | -------------------------------------------------------------------------------- /challenge_1/python/alexbotello/main.py: -------------------------------------------------------------------------------- 1 | if __name__ == '__main__': 2 | phrase = input() 3 | print(''.join([phrase[len(phrase)-i-1] for i in range(len(phrase))]), end='') 4 | print() 5 | -------------------------------------------------------------------------------- /challenge_1/python/alexmunoz905/main.py: -------------------------------------------------------------------------------- 1 | # AlexMunoz905 | 1/1/17 2 | 3 | answer = "Hello 2017!"[::-1] 4 | print(answer) 5 | -------------------------------------------------------------------------------- /challenge_1/python/alexmunoz905/readme.md: -------------------------------------------------------------------------------- 1 | # Python AlexMunoz905 #2 2 | --- 3 | Reverse a string in python. 4 | -------------------------------------------------------------------------------- /challenge_1/python/boilerup_brian/README.md: -------------------------------------------------------------------------------- 1 | ##RUN 2 | from the src directory, run 3 | $python3 stringreverse.py 4 | 5 | ##EXPLANATION 6 | Prompts user for input and reverses the string 7 | given by the user 8 | 9 | -------------------------------------------------------------------------------- /challenge_1/python/boilerup_brian/src/stringreverse.py: -------------------------------------------------------------------------------- 1 | #input a string to reverse 2 | toreverse = input('Input a string to be reversed: '); 3 | 4 | reversed = '' 5 | 6 | for i in range(1, len(toreverse) + 1): 7 | reversed += toreverse[len(toreverse) - i] 8 | 9 | print('%s\n' %reversed) 10 | -------------------------------------------------------------------------------- /challenge_1/python/bryantpq/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 1 2 | FILES: 3 | 1. reverse.py 4 | Reverses the given string 5 | -------------------------------------------------------------------------------- /challenge_1/python/bryantpq/reverse.py: -------------------------------------------------------------------------------- 1 | def reverse_str(s): 2 | print(s[::-1]) 3 | 4 | if __name__ == "__main__": 5 | reverse_str("hello") 6 | -------------------------------------------------------------------------------- /challenge_1/python/carter010/reverse.py: -------------------------------------------------------------------------------- 1 | # python3 --3.5 2 | 3 | message = "Hello" 4 | print(message[::-1] 5 | -------------------------------------------------------------------------------- /challenge_1/python/dashsten/challenge_1.py: -------------------------------------------------------------------------------- 1 | print 'hello world'[::-1] 2 | -------------------------------------------------------------------------------- /challenge_1/python/dfdx2/reverse.py: -------------------------------------------------------------------------------- 1 | print("hello"[::-1]) -------------------------------------------------------------------------------- /challenge_1/python/dlutsch/reverse_string.py: -------------------------------------------------------------------------------- 1 | print(input("Enter string to be reversed: ")[::-1]) 2 | -------------------------------------------------------------------------------- /challenge_1/python/dsyost/README.md: -------------------------------------------------------------------------------- 1 | # Challenge_1 2 | ## reverse.py 3 | This is a program that takes a string and returns the reverse of it. 4 | 5 | The program uses a function called reverse() that takes one argument (string) that returns the reversed string. -------------------------------------------------------------------------------- /challenge_1/python/dsyost/src/reverse.py: -------------------------------------------------------------------------------- 1 | def reverse(string): 2 | return string[::-1] 3 | 4 | print(reverse("hello")) 5 | -------------------------------------------------------------------------------- /challenge_1/python/gshooty/reverse.py: -------------------------------------------------------------------------------- 1 | thing = raw_input("Enter string ") 2 | print thing[::-1] 3 | 4 | -------------------------------------------------------------------------------- /challenge_1/python/gwong/challenge_1.py: -------------------------------------------------------------------------------- 1 | reverse = "This is a test" 2 | print(reverse[::-1]) 3 | -------------------------------------------------------------------------------- /challenge_1/python/igniteflow/README.md: -------------------------------------------------------------------------------- 1 | Output: 2 | 3 | $ python ./src/challenge_1.py 4 | Before: easy as abc 5 | After: cba sa ysae 6 | 7 | *Note `python` is not required if the file is executable 8 | -------------------------------------------------------------------------------- /challenge_1/python/jarydremillard/reverse.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | def reverse(string): 4 | return string[::-1] 5 | 6 | if __name__ == '__main__': 7 | print(reverse(" ".join(sys.argv[1:]))) 8 | -------------------------------------------------------------------------------- /challenge_1/python/jcpattison/README.md: -------------------------------------------------------------------------------- 1 | 1. Leverages built-in python input function to return user input as string 2 | 2. Return user provided string in reverse using slice with a negative step 3 | -------------------------------------------------------------------------------- /challenge_1/python/jcpattison/src/reverse.py: -------------------------------------------------------------------------------- 1 | a = input("Enter your string to reverse: \n") 2 | print(a[::-1]) 3 | -------------------------------------------------------------------------------- /challenge_1/python/kar-moore/README.md: -------------------------------------------------------------------------------- 1 | reverse_string takes in a string s and outputs the reversed string. It works by making a copy of the string s in reverse order. Python has three arguements for slice, the first is the start point, the second is end point, and the third is the increment value. By putting two colons, we tell Python to use the default values (the start and end of the string) and the increment is -1, so it goes backwards. -------------------------------------------------------------------------------- /challenge_1/python/kar-moore/src/challenge1.py: -------------------------------------------------------------------------------- 1 | def reverse_string(s): 2 | return s[::-1] 3 | 4 | print reverseStr("abc") 5 | print reverseStr("hello everyone") -------------------------------------------------------------------------------- /challenge_1/python/kokimame/README.md: -------------------------------------------------------------------------------- 1 | Reversing a string using slice notation. 2 | -------------------------------------------------------------------------------- /challenge_1/python/kokimame/reverse_string.py: -------------------------------------------------------------------------------- 1 | string = input("Input a string ... ") 2 | print(string[::-1]) 3 | -------------------------------------------------------------------------------- /challenge_1/python/lepmets/README.md: -------------------------------------------------------------------------------- 1 | # Challenge #1 in Python 2 | -------------------------------------------------------------------------------- /challenge_1/python/lepmets/src/challenge_1.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/python3 2 | """Challenge 1 in Python.""" 3 | # coding: utf-8 4 | 5 | s = "hello" 6 | 7 | for i in range(len(s) - 1, -1, -1): 8 | print(s[i], end='') 9 | -------------------------------------------------------------------------------- /challenge_1/python/lex32pem/challenge_1.py: -------------------------------------------------------------------------------- 1 | # this is a quick application to reverse a phrase/word entered by the user. 2 | 3 | userString = input("Please enter the phrase/word you want to reverse: ") 4 | userRev = userString [::-1] 5 | print ("The entered phrase/word is: " + userString) 6 | print ("The reversed phrase/word is: " + userRev) -------------------------------------------------------------------------------- /challenge_1/python/lex32pem/readme.md: -------------------------------------------------------------------------------- 1 | This is related to challenge_1 2 | String reverse 3 | -------------------------------------------------------------------------------- /challenge_1/python/manuel/solution.py: -------------------------------------------------------------------------------- 1 | string = input() 2 | print(string[::-1]) 3 | -------------------------------------------------------------------------------- /challenge_1/python/mindm/README.md: -------------------------------------------------------------------------------- 1 | # Challenge_1 2 | ## Reverse a String 3 | This program will reverse your input! 4 | 5 | You can run it by typing the following on your command line: 6 | ``` 7 | $ python3 reverse.py [input] 8 | ``` 9 | Notice the command line argument! 10 | 11 | -------------------------------------------------------------------------------- /challenge_1/python/mindm/src/reverse.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | import sys 4 | 5 | in_string = " ".join(sys.argv[1:]) 6 | 7 | print(in_string[::-1]) 8 | 9 | -------------------------------------------------------------------------------- /challenge_1/python/mjuiuc/ReverseString.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | 4 | string = "I'm going to reverse this" 5 | 6 | print string[::-1] 7 | -------------------------------------------------------------------------------- /challenge_1/python/nebi/README.md: -------------------------------------------------------------------------------- 1 | ## Challenge 1 in Python 2 | 3 | Python program that reverse the string s 4 | -------------------------------------------------------------------------------- /challenge_1/python/nebi/src/reverse.py: -------------------------------------------------------------------------------- 1 | """Reverse the string hello """ 2 | print('hello'[::-1]) 3 | 4 | -------------------------------------------------------------------------------- /challenge_1/python/ning/challenge_1.py: -------------------------------------------------------------------------------- 1 | def reverse_string(original_string): 2 | return original_string[::-1] 3 | 4 | original_string = str(input("Enter a string to be reversed > ")) 5 | print(reverse_string(original_string)) 6 | 7 | -------------------------------------------------------------------------------- /challenge_1/python/papersquares/stringreversechallenge1.py: -------------------------------------------------------------------------------- 1 | n = str(raw_input('what would you like to see backwards?:')) 2 | print n [::-1] 3 | 4 | 5 | -------------------------------------------------------------------------------- /challenge_1/python/phil-harmoniq/challenge_1.py: -------------------------------------------------------------------------------- 1 | s = "I am going to reverse this string" 2 | print(s[::-1]) 3 | -------------------------------------------------------------------------------- /challenge_1/python/polar/README.md: -------------------------------------------------------------------------------- 1 | I wanted this program to work with any string. First, I create a list for the end output. Then, I get the length of the string. Then for as many times as there are characters in the string, I add the the last character to the list i created in the beginning. This is completed, and then i complete the string. -------------------------------------------------------------------------------- /challenge_1/python/polar/src/reverse.py: -------------------------------------------------------------------------------- 1 | string = "hello" 2 | reversedstring = [] 3 | index = len(string) 4 | print(index) 5 | for i in string: 6 | reversedstring.append(string[index-1]) 7 | index = index - 1 8 | print(reversedstring) 9 | 10 | -------------------------------------------------------------------------------- /challenge_1/python/popcorn_anachronism/challenge_1.py: -------------------------------------------------------------------------------- 1 | text = input() 2 | print(text[::-1]) 3 | -------------------------------------------------------------------------------- /challenge_1/python/popcorn_anachronism/readme.md: -------------------------------------------------------------------------------- 1 | Prints a reversed string using extended slice. Python 3 2 | -------------------------------------------------------------------------------- /challenge_1/python/psonghi/README.md: -------------------------------------------------------------------------------- 1 | #Challenge 1 2 | 3 | ##Reverse a string 4 | 5 | given a string, returns reversed string and prints. the default string value is "hello". 6 | -------------------------------------------------------------------------------- /challenge_1/python/psonghi/src/reverse_string.py: -------------------------------------------------------------------------------- 1 | def reverse_string(s="hello"): 2 | s_reverse = s[::-1] 3 | return s_reverse 4 | 5 | print(reverse_string()) 6 | -------------------------------------------------------------------------------- /challenge_1/python/py2k5/reverseString.py: -------------------------------------------------------------------------------- 1 | str="Hello world" 2 | revStr=''.join(reversed(str)) 3 | print(revStr) 4 | -------------------------------------------------------------------------------- /challenge_1/python/returnlove/README.md: -------------------------------------------------------------------------------- 1 | Solution to reverse a string 2 | 3 | Run: 4 | 5 | python reverse_a_string.py 6 | type input string on the console and enter -------------------------------------------------------------------------------- /challenge_1/python/sarcodian/README.md: -------------------------------------------------------------------------------- 1 | Reversing a string -------------------------------------------------------------------------------- /challenge_1/python/sarcodian/src/challenge_1.py: -------------------------------------------------------------------------------- 1 | def reverse(): 2 | s = input('Please enter a string: ') 3 | h = s[::-1] 4 | return h 5 | 6 | reverse() 7 | -------------------------------------------------------------------------------- /challenge_1/python/shaowen/reverse.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Wed Jan 4 10:36:21 2017 4 | 5 | @author: shaowen Liu 6 | """ 7 | def reverse(s): 8 | return s[::-1] 9 | -------------------------------------------------------------------------------- /challenge_1/python/slandau/README.md: -------------------------------------------------------------------------------- 1 | Challange 1, reverse a string by Steven Landau 2 | -------------------------------------------------------------------------------- /challenge_1/python/slansford/README.md: -------------------------------------------------------------------------------- 1 | Prints reversed string provided by user input. Uses Python 3.6 -------------------------------------------------------------------------------- /challenge_1/python/slansford/src/challenge_1.py: -------------------------------------------------------------------------------- 1 | #Program asks user for word, reverses word, and returns the reversed word 2 | 3 | #Asks user for input and reverses letters of word 4 | 5 | rev_word = input('What word would you like reversed? ')[::-1] 6 | 7 | #prints reversed word 8 | 9 | print(rev_word) -------------------------------------------------------------------------------- /challenge_1/python/slickness/README.MD: -------------------------------------------------------------------------------- 1 | challenge_1 2 | 3 | user will input a string 4 | 5 | then the script will reverse the string and output it to stdout 6 | 7 | no error checking 8 | -------------------------------------------------------------------------------- /challenge_1/python/slickness/challenge_1.py: -------------------------------------------------------------------------------- 1 | toReverse = input ("Please enter a string to reverse: ") 2 | 3 | print (toReverse[::-1]) 4 | 5 | -------------------------------------------------------------------------------- /challenge_1/python/sysek/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 1 2 | ###### Python 3.6 3 | ### 1. Approch to solving the problem 4 | Print reverse word, for example 5 | hello = olleh 6 | 7 | ### 2. How to run this code? 8 | ``` 9 | $ python3 reverse.py 10 | 11 | Gimmie some word 12 | hello world 13 | dlrow olleh 14 | ``` 15 | ### 3. How this program works? 16 | Print reversed word 17 | -------------------------------------------------------------------------------- /challenge_1/python/sysek/src/reverse.py: -------------------------------------------------------------------------------- 1 | def reverse(string): 2 | return string[::-1] 3 | 4 | print('Gimmie some word') 5 | s = input() 6 | print(reverse(s)) 7 | -------------------------------------------------------------------------------- /challenge_1/python/system123/README.md: -------------------------------------------------------------------------------- 1 | run it with: 2 | 3 | python3 challenge1.py -------------------------------------------------------------------------------- /challenge_1/python/system123/challenge1.py: -------------------------------------------------------------------------------- 1 | str = input("Type a string: ") 2 | print(str[::-1]) 3 | -------------------------------------------------------------------------------- /challenge_1/python/tavery321/README.md: -------------------------------------------------------------------------------- 1 | Python program that reverses a string 2 | -------------------------------------------------------------------------------- /challenge_1/python/tavery321/src/c1.py: -------------------------------------------------------------------------------- 1 | string = "Hello" 2 | print(string[::-1]) 3 | -------------------------------------------------------------------------------- /challenge_1/python/tursup/READMEE.MD: -------------------------------------------------------------------------------- 1 | Reversing a string, with the bonus of reversing a inputted string. 2 | -------------------------------------------------------------------------------- /challenge_1/python/tursup/challenge1.py: -------------------------------------------------------------------------------- 1 | string = "Reverse me." #predetermined string 2 | print string[::-1] #reversed 3 | 4 | string1 = raw_input("Enter something and get a suprise: ") # take user input 5 | print string1[::-1] #reversed user input 6 | -------------------------------------------------------------------------------- /challenge_1/python/tvanderwal/README.md: -------------------------------------------------------------------------------- 1 | ##Challenge 1 2 | 3 | USE: 4 | 5 | 1) Get string from input 6 | 2) Reverse it 7 | 8 | NOTE: 9 | 10 | Done with python 3.5 -------------------------------------------------------------------------------- /challenge_1/python/tvanderwal/src/challenge_1.py: -------------------------------------------------------------------------------- 1 | s = input('Enter string:') 2 | #Use extended splice 3 | print(s[::-1]) 4 | 5 | #one liner since instructions said to make it as short as possible 6 | print(input('Enter string:')[::-1]) -------------------------------------------------------------------------------- /challenge_1/python/ukirderohit/reverse.py: -------------------------------------------------------------------------------- 1 | print(input("Enter string: ")[::-1]) 2 | -------------------------------------------------------------------------------- /challenge_1/python/walkingluo/README.md: -------------------------------------------------------------------------------- 1 | ## Challenge_1 2 | 3 | - reverse a string -------------------------------------------------------------------------------- /challenge_1/python/walkingluo/src/reverse_string.py: -------------------------------------------------------------------------------- 1 | # 2 | # Reverse a String 3 | # 4 | 5 | 6 | def reverse_string(input_str): 7 | return input_str[::-1] 8 | 9 | 10 | if __name__ == '__main__': 11 | input_str = "hello" 12 | reverse_str = reverse_string(input_str) 13 | print(reverse_str) 14 | -------------------------------------------------------------------------------- /challenge_1/python/whiterd/README.md: -------------------------------------------------------------------------------- 1 | 2 | Input: string 3 | 4 | Output: a reversed string of the given input -------------------------------------------------------------------------------- /challenge_1/python/whiterd/src/reverse_me.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from __future__ import print_function 4 | 5 | user_input = input('Enter text to be reversed: ') 6 | 7 | print(user_input[::-1]) 8 | -------------------------------------------------------------------------------- /challenge_1/python/wobboz/src/reverse.py: -------------------------------------------------------------------------------- 1 | from sys import argv 2 | 3 | if len(argv) == 1: 4 | print("[usage] reverse needs one argument") 5 | elif len(argv) == 2: 6 | print(argv[1][::-1]) 7 | else: 8 | print("[usage] reverse only takes one argument") -------------------------------------------------------------------------------- /challenge_1/python/wost/main.py: -------------------------------------------------------------------------------- 1 | def reverse_string(string): 2 | for i in range(len(string) - 1, -1, -1): 3 | print(string[i], end="") 4 | print() 5 | 6 | def main(): 7 | reverse_string("this was a triumph") 8 | reverse_string("hello world") 9 | reverse_string("42") 10 | 11 | if __name__ == "__main__": 12 | main() 13 | -------------------------------------------------------------------------------- /challenge_1/python/zanetti/challenge_0.py: -------------------------------------------------------------------------------- 1 | a=list(input("Insert the you want to invert :")) #input to user choose the characteres to invert - in a list form 2 | 3 | print('the choosen world: ', a) 4 | a.reverse() #invert the "a" list 5 | print('reversed: ', a) 6 | -------------------------------------------------------------------------------- /challenge_1/python/zooks97/README.md: -------------------------------------------------------------------------------- 1 | ## Run 2 | Use python 3.5+ 3 | $python3 reverseInput.py 4 | 5 | ## Explanation 6 | Takes an input string, then converts the string to a list of characters. 7 | The list is reversed using the built-in reverse function, then the characters 8 | are rejoined into a string. The reversed string is printed to the user. 9 | -------------------------------------------------------------------------------- /challenge_1/python/zooks97/reverseInput.py: -------------------------------------------------------------------------------- 1 | inText = input("Input some characters: ") #Get the text input 2 | 3 | listText = list(inText) #Convert the input string to a list 4 | listText.reverse() #Reverse the character list 5 | outText = ''.join(listText) #Revert list to string 6 | 7 | print(outText) #Print reversed string 8 | -------------------------------------------------------------------------------- /challenge_1/python/zooks97/src/reverseInput.py: -------------------------------------------------------------------------------- 1 | inText = input("Input some characters: ") #Get the text input 2 | 3 | listText = list(inText) #Convert the input string to a list 4 | listText.reverse() #Reverse the character list 5 | outText = ''.join(listText) #Revert list to string 6 | 7 | print(outText) #Print reversed string 8 | -------------------------------------------------------------------------------- /challenge_1/r/aev1tas/ReverseString.R: -------------------------------------------------------------------------------- 1 | s<-"Hello" 2 | paste(rev(substring(s,1:nchar(s),1:nchar(s))),collapse="") 3 | -------------------------------------------------------------------------------- /challenge_1/r/henriquefb/README.md: -------------------------------------------------------------------------------- 1 | ********************************* 2 | * Challenge 1: Henrique Barbosa * 3 | ********************************* 4 | 5 | The file challenge_1.R offers a solution to the first challenge in R. 6 | It should work both interactively, being run directly from R or Rstudio, 7 | and also as directly run from the shell using Rscript. Comments and 8 | suggestions are well appreciated! 9 | -------------------------------------------------------------------------------- /challenge_1/ruby/ConorWright/README.md: -------------------------------------------------------------------------------- 1 | Make sure you have ruby installed to use this. 2 | Program only supports one argument and strings. 3 | 4 | run with ./string_reverse.rb 5 | -------------------------------------------------------------------------------- /challenge_1/ruby/ConorWright/string_reverse.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby 2 | 3 | if ARGV[0].to_i != 0 4 | puts "Must be a string" 5 | abort 6 | end 7 | 8 | puts ARGV[0].reverse 9 | -------------------------------------------------------------------------------- /challenge_1/rust/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /challenge_1/rust/deg4uss3r/challenge_1/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "challenge_1" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_1/rust/deg4uss3r/challenge_1/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "challenge_1" 3 | version = "0.1.0" 4 | authors = ["Ricky - degausser"] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_1/rust/deg4uss3r/challenge_1/README.md: -------------------------------------------------------------------------------- 1 | # To run 2 | `cargo test` will run the test in ./tests which asserts the function reverses the string "hello" and "hi5, yo" 3 | 4 | # To use 5 | in your program do: 6 | ``` 7 | extern crate challenge_1 8 | use challenge_1::string_reverse 9 | 10 | string_reverse("your string here".to_string()); 11 | ``` 12 | 13 | function then returns a std::string::String 14 | -------------------------------------------------------------------------------- /challenge_1/rust/deg4uss3r/challenge_1/tests/main.rs: -------------------------------------------------------------------------------- 1 | extern crate challenge_1; 2 | use challenge_1::string_reverse; 3 | 4 | #[test] 5 | fn hello_test() { 6 | assert_eq!(string_reverse("hello".to_string()), "olleh".to_string()); 7 | } 8 | -------------------------------------------------------------------------------- /challenge_1/rust/josephpd3/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "josephpd3" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_1/rust/josephpd3/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "josephpd3" 3 | version = "0.1.0" 4 | authors = ["Joseph P DeBartola III "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_1/rust/josephpd3/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub fn reverse(s: &str) -> String { 2 | s.chars().rev().collect::() 3 | } 4 | -------------------------------------------------------------------------------- /challenge_1/rust/josephpd3/tests/josephpd3.rs: -------------------------------------------------------------------------------- 1 | extern crate josephpd3; 2 | 3 | use josephpd3::*; 4 | 5 | #[test] 6 | fn reverse_string() { 7 | let s: String = "hello".to_owned(); 8 | assert_eq!("olleh".to_owned(), reverse(s.as_str())); 9 | } 10 | -------------------------------------------------------------------------------- /challenge_1/rust/makernaren/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "makernaren" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_1/rust/makernaren/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "makernaren" 3 | version = "0.1.0" 4 | authors = ["naren "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_1/rust/makernaren/src/main.rs: -------------------------------------------------------------------------------- 1 | mod string_reverser; 2 | 3 | fn main() { 4 | let input = "hello"; 5 | println!("Entered String : {}", input); 6 | let result = string_reverser::reverse(input); 7 | println!("Reversed String : {}", result); 8 | } -------------------------------------------------------------------------------- /challenge_1/rust/myrrlyn/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "myrrlyn" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_1/rust/myrrlyn/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "myrrlyn" 3 | version = "0.1.0" 4 | authors = ["myrrlyn "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_1/scala/ndsmith3/README.md: -------------------------------------------------------------------------------- 1 | String Reverser 2 | --- 3 | This application takes a string argument frin the command line and prints it in reverse. 4 | -------------------------------------------------------------------------------- /challenge_1/scala/ndsmith3/StringReverse.scala: -------------------------------------------------------------------------------- 1 | object StringReverse { 2 | def reverse(in: String, out: String = ""): String = 3 | if (in.isEmpty) out else reverse(in.tail, in.head + out) 4 | } 5 | 6 | object Challenge2 extends App { 7 | import StringReverse.reverse 8 | println(reverse(args.head)) 9 | } 10 | -------------------------------------------------------------------------------- /challenge_1/swift/garytate/challenge_1.swift: -------------------------------------------------------------------------------- 1 | let string = "Welcome to the world..." 2 | let rString = String((string).characters.reversed()) 3 | 4 | print(string) 5 | print(rString) 6 | -------------------------------------------------------------------------------- /challenge_1/swift/stevenr12/README.md: -------------------------------------------------------------------------------- 1 | Apple Swift version 3.0.2 2 | 3 | Run with the command: swift ./reverse.swift 4 | -------------------------------------------------------------------------------- /challenge_1/swift/stevenr12/reverse.swift: -------------------------------------------------------------------------------- 1 | print("Please enter a string😮: ") 2 | if let s = readLine() { 3 | print(String(s.characters.reversed())) 4 | } 5 | -------------------------------------------------------------------------------- /challenge_10/python/sarcodian/READ.me: -------------------------------------------------------------------------------- 1 | Takes a string and checks to see every openning {,(,[ 2 | has a corresponding closing ],),}. 3 | 4 | Does this by appending a list of every openning and deletes 5 | the last element when it comes accross a matching closing. 6 | 7 | If the closing is off a different type or if the list has 8 | elements remaining then returns False. -------------------------------------------------------------------------------- /challenge_10/python/shaowen/READE.md: -------------------------------------------------------------------------------- 1 | ##Valid Closers 2 | 3 | Language Version: Python 2.7.12 4 | 5 | 6 | ###Solution 7 | 8 | stack! push and pop 9 | 10 | ###Testing 11 | 12 | $ python unit_test.py 13 | -------------------------------------------------------------------------------- /challenge_10/rust/deg4uss3r/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YearOfProgramming/2017Challenges/a8f556f1d5b43c099a0394384c8bc2d826f9d287/challenge_10/rust/deg4uss3r/README.md -------------------------------------------------------------------------------- /challenge_10/rust/deg4uss3r/challenge_10/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "challenge_10" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_10/rust/deg4uss3r/challenge_10/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "challenge_10" 3 | version = "0.1.0" 4 | authors = ["deg4uss3r "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_10/testfiles/o1: -------------------------------------------------------------------------------- 1 | True 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/o2: -------------------------------------------------------------------------------- 1 | True 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/o3: -------------------------------------------------------------------------------- 1 | True 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/o4: -------------------------------------------------------------------------------- 1 | True 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/o5: -------------------------------------------------------------------------------- 1 | True 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/o6: -------------------------------------------------------------------------------- 1 | False 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/o7: -------------------------------------------------------------------------------- 1 | True 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/o8: -------------------------------------------------------------------------------- 1 | False 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/o9: -------------------------------------------------------------------------------- 1 | True 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/t1: -------------------------------------------------------------------------------- 1 | {{{}}} 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/t2: -------------------------------------------------------------------------------- 1 | {{[[((ajfdafje))3jkad]jd]da}d} 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/t3: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/t4: -------------------------------------------------------------------------------- 1 | () 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/t5: -------------------------------------------------------------------------------- 1 | dajkf[afda]dafdsa 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/t6: -------------------------------------------------------------------------------- 1 | {{{{{{{{{adfkjaefia}}}}}}} 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/t7: -------------------------------------------------------------------------------- 1 | {{{{{{{{{[[[[[[kadfa{{{{{{{((({daljfdaf({{{[]}}kaldjfs})})))}}}}}}}]]]]]]}kjfela}}}}}}}} 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/t8: -------------------------------------------------------------------------------- 1 | {{{[}}}}dafda 2 | -------------------------------------------------------------------------------- /challenge_10/testfiles/t9: -------------------------------------------------------------------------------- 1 | {{{{{{{{{}}}}}}}}} 2 | -------------------------------------------------------------------------------- /challenge_11/python/mindm/README.md: -------------------------------------------------------------------------------- 1 | # Challenge_11 2 | ## Remove Node from BST 3 | This program creates a BST from your input and then removes nodes from it. 4 | 5 | You can run it with: 6 | ``` 7 | $ python3 remove_from_tree.py 8 | ``` 9 | -------------------------------------------------------------------------------- /challenge_11/testfiles/o1: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | 4 5 | 5 6 | 6 7 | 7 8 | 8 9 | 9 10 | 5 11 | 3 12 | 2 13 | 1 14 | 4 15 | 7 16 | 6 17 | 9 18 | 8 19 | 1 20 | 2 21 | 4 22 | 3 23 | 6 24 | 8 25 | 9 26 | 7 27 | 5 28 | -------------------------------------------------------------------------------- /challenge_11/testfiles/o2: -------------------------------------------------------------------------------- 1 | 2 2 | 4 3 | 6 4 | 8 5 | 9 6 | 11 7 | 12 8 | 14 9 | 15 10 | 17 11 | 21 12 | 30 13 | 40 14 | 8 15 | 4 16 | 2 17 | 6 18 | 15 19 | 9 20 | 11 21 | 12 22 | 14 23 | 40 24 | 30 25 | 17 26 | 21 27 | 2 28 | 6 29 | 4 30 | 14 31 | 12 32 | 11 33 | 9 34 | 21 35 | 17 36 | 30 37 | 40 38 | 15 39 | 8 40 | -------------------------------------------------------------------------------- /challenge_11/testfiles/o3: -------------------------------------------------------------------------------- 1 | 1 2 | 3 3 | 4 4 | 5 5 | 8 6 | 9 7 | 2 8 | 1 9 | 11 10 | 9 11 | 5 12 | 5 13 | 1 14 | 2 15 | 9 16 | 11 17 | -------------------------------------------------------------------------------- /challenge_11/testfiles/o4: -------------------------------------------------------------------------------- 1 | 15 2 | 7 3 | 5 4 | 3 5 | 1 6 | 4 7 | 8 8 | 11 9 | 9 10 | 14 11 | 7 12 | 5 13 | 3 14 | 1 15 | 8 16 | 11 17 | 9 18 | 14 19 | 7 20 | 5 21 | 3 22 | 1 23 | 2 24 | 6 25 | 11 26 | 9 27 | 14 28 | -------------------------------------------------------------------------------- /challenge_11/testfiles/t1: -------------------------------------------------------------------------------- 1 | i5 2 | i3 3 | i2 4 | i7 5 | i9 6 | i8 7 | i6 8 | i1 9 | i4 10 | oin 11 | opre 12 | opost 13 | e 14 | 15 | -------------------------------------------------------------------------------- /challenge_11/testfiles/t2: -------------------------------------------------------------------------------- 1 | i8 2 | i4 3 | i6 4 | i2 5 | i15 6 | i40 7 | i30 8 | i17 9 | i9 10 | i11 11 | i12 12 | i14 13 | i21 14 | oin 15 | opre 16 | opost 17 | e 18 | 19 | -------------------------------------------------------------------------------- /challenge_11/testfiles/t3: -------------------------------------------------------------------------------- 1 | i5 2 | i3 3 | i4 4 | i1 5 | i8 6 | i9 7 | oin 8 | d8 9 | i11 10 | i2 11 | d3 12 | d4 13 | opost 14 | opre 15 | e 16 | 17 | -------------------------------------------------------------------------------- /challenge_11/testfiles/t4: -------------------------------------------------------------------------------- 1 | i15 2 | i7 3 | i8 4 | i5 5 | i11 6 | i9 7 | i14 8 | i3 9 | i4 10 | i1 11 | opre 12 | d15 13 | d4 14 | opre 15 | i2 16 | i6 17 | d8 18 | opre 19 | e 20 | -------------------------------------------------------------------------------- /challenge_12/python/sarcodian/READ.me: -------------------------------------------------------------------------------- 1 | Two Fuctions: 2 | 3 | Compress: 4 | Make a new string and append all chars unless same consecutive char, 5 | then store those in a temp variable, if 5 or more then compress. 6 | 7 | Decompress: 8 | Make a new string and add N instances of y after encountering any instances 9 | of y#N -------------------------------------------------------------------------------- /challenge_12/python/slandau3/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.linting.pylintEnabled": true, 3 | "python.pythonPath": "python3", 4 | "python.formatting.provider": "autopep8" 5 | } -------------------------------------------------------------------------------- /challenge_12/rust/deg4uss3r/challenge_12/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "challenge_12" 3 | version = "0.1.0" 4 | authors = ["deg4uss3r "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_12/rust/deg4uss3r/challenge_12/src/lib.rs: -------------------------------------------------------------------------------- 1 | #[cfg(test)] 2 | mod tests { 3 | #[test] 4 | fn it_works() { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /challenge_13/c/karanchawla/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | Karan Chawla 3 | Challenge 13 4 | ``` 5 | 6 | The code just reverses the input number and checks if it is the same as the original number. The method returns ```true``` if the number is a palindrome, else it returns ```flase```. 7 | -------------------------------------------------------------------------------- /challenge_13/python/sarcodian/READ.me: -------------------------------------------------------------------------------- 1 | Uses a loop with // 10 to get how many digits in the number. 2 | 3 | Then compares the first and last using % 10 (for the last) 4 | and // 10 ** length-1 (for the first). Uses same concept to 5 | delete the two digits for the next pass. 6 | 7 | Loops over the number length // 2 times. 8 | -------------------------------------------------------------------------------- /challenge_13/python/system123/challenge_13.py: -------------------------------------------------------------------------------- 1 | 2 | def rev_num(x): 3 | rev = 0 4 | 5 | while(x != 0): 6 | # Move all digits in rev up to the next significant place 7 | # Append the last digit of x 8 | rev = (rev * 10) + (x % 10) 9 | # Drop the last digit of x 10 | x = x//10 11 | 12 | return(rev) 13 | 14 | 15 | def is_palindrome(x): 16 | return(x - rev_num(x) == 0) -------------------------------------------------------------------------------- /challenge_13/rust/deg4uss3r/challenge_13/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "challenge_13" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_13/rust/deg4uss3r/challenge_13/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "challenge_13" 3 | version = "0.1.0" 4 | authors = ["deg4uss3r "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_13/tests/test1: -------------------------------------------------------------------------------- 1 | 1221 2 | -------------------------------------------------------------------------------- /challenge_13/tests/test2: -------------------------------------------------------------------------------- 1 | 18433481 2 | -------------------------------------------------------------------------------- /challenge_13/tests/test3: -------------------------------------------------------------------------------- 1 | 102 2 | -------------------------------------------------------------------------------- /challenge_13/tests/test4: -------------------------------------------------------------------------------- 1 | 5055 2 | -------------------------------------------------------------------------------- /challenge_13/tests/test5: -------------------------------------------------------------------------------- 1 | 666 2 | -------------------------------------------------------------------------------- /challenge_14/c/karanchawla/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | Karan Chawla 3 | Challenge 14 4 | ``` 5 | 6 | Approach: The aim here is to reverse a linked list. This is achieved by using three pointers - prev, current and next. Current moves along the linked list while the prev and next pointers are switched. Finally the head is set to the prev - completing the list reversal. -------------------------------------------------------------------------------- /challenge_14/tests/test1: -------------------------------------------------------------------------------- 1 | r e d r u m 2 | -------------------------------------------------------------------------------- /challenge_14/tests/test2: -------------------------------------------------------------------------------- 1 | p a r k 2 | -------------------------------------------------------------------------------- /challenge_14/tests/test3: -------------------------------------------------------------------------------- 1 | b o o b y t r a p 2 | -------------------------------------------------------------------------------- /challenge_14/tests/test4: -------------------------------------------------------------------------------- 1 | l i v e 2 | -------------------------------------------------------------------------------- /challenge_16/c/karanchawla/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | Karan Chawla 3 | Challenge 16 4 | ``` 5 | 6 | Apart from the basic challenge requirements of calculating string permutations with each char unique in the input 7 | string, also implements repeated chars in input string. 8 | Formula used for calculating the number of permutations = str.size()!/n! (where a char is repeated n times in str) -------------------------------------------------------------------------------- /challenge_16/cpp/karanchawla/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | Karan Chawla 3 | Challenge 16 4 | ``` 5 | Approach: Implements simple factorial calculation on the number of chars present in the string -------------------------------------------------------------------------------- /challenge_16/cpp/karanchawla/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.6) 2 | project(newp) 3 | 4 | set(CMAKE_CXX_STANDARD 98) 5 | 6 | set(SOURCE_FILES main.cpp challenge_16.cpp challenge_16.h) 7 | add_executable(newp ${SOURCE_FILES}) -------------------------------------------------------------------------------- /challenge_16/cpp/karanchawla/src/challenge_16.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by karan on 1/24/17. 3 | // 4 | 5 | #ifndef NEWP_CHALLENGE_16_H 6 | #define NEWP_CHALLENGE_16_H 7 | 8 | 9 | #include 10 | 11 | class challenge_16 12 | { 13 | public: 14 | int calculatePermutations(std::string &str); 15 | }; 16 | 17 | 18 | #endif //NEWP_CHALLENGE_16_H 19 | -------------------------------------------------------------------------------- /challenge_2/c/nasciiboy/Makefile: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | SRCDIR = src 3 | OUTDIR = bin 4 | OUTPUT = unintq 5 | RM = rm -rf 6 | 7 | all: $(SRCDIR)/main.c 8 | mkdir -p $(OUTDIR) 9 | $(CC) -g -Wall -o $(OUTDIR)/$(OUTPUT) $(SRCDIR)/*.c 10 | 11 | clean: 12 | $(RM) $(OUTDIR)/* 13 | 14 | test: 15 | @$(OUTDIR)/$(OUTPUT) 16 | -------------------------------------------------------------------------------- /challenge_2/c/scottsquatch/Makefile: -------------------------------------------------------------------------------- 1 | SRCDIR=src 2 | OUTDIR=bin 3 | APPNAME=find_non_dups 4 | RM=rm -rf 5 | 6 | all: $(SRCDIR)/* 7 | mkdir -p $(OUTDIR) 8 | gcc -g -Wall -o $(OUTDIR)/$(APPNAME) $(SRCDIR)/* 9 | 10 | clean: 11 | $(RM) $(OUTDIR)/* 12 | -------------------------------------------------------------------------------- /challenge_2/c/scottsquatch/README.md: -------------------------------------------------------------------------------- 1 | # Single Number 2 | [DESCRIPTION] 3 | 4 | ## Building 5 | ``` bash 6 | make 7 | ``` 8 | 9 | ## Running 10 | ``` bash 11 | ./find_non_dups 12 | ``` 13 | 14 | ## Cleanup 15 | ``` bash 16 | make clean 17 | ``` 18 | -------------------------------------------------------------------------------- /challenge_2/cpp/blakebarnes00/Makefile: -------------------------------------------------------------------------------- 1 | CXX = g++ 2 | FLG = -w -std=c++11 3 | 4 | EXE = challenge_2 5 | SRC = main.cpp 6 | 7 | all: 8 | $(CXX) $(FLG) -o $(EXE) ./src/$(SRC) 9 | 10 | clean: 11 | -rm $(EXE) 12 | -------------------------------------------------------------------------------- /challenge_2/cpp/manuel/src/include/singleNumber.h: -------------------------------------------------------------------------------- 1 | #ifndef SINGLENUMBER_H 2 | #define SINGLENUMBER_H 3 | 4 | int findMax (std::vector); 5 | std::vector stringToDigits (std::string); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /challenge_2/csharp/bdoner/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YearOfProgramming/2017Challenges/a8f556f1d5b43c099a0394384c8bc2d826f9d287/challenge_2/csharp/bdoner/README.md -------------------------------------------------------------------------------- /challenge_2/csharp/fojo/Challenge2.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | namespace Challenges 5 | { 6 | public class Challenge2 7 | { 8 | public static List GetOneCountItems(char[] inputArray) 9 | { 10 | return inputArray.Where(x => inputArray.Count(i => i == x) == 1).ToList(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /challenge_2/elixir/joegotflow83/single_number/test/test_helper.exs: -------------------------------------------------------------------------------- 1 | ExUnit.start() 2 | -------------------------------------------------------------------------------- /challenge_2/go/natdm/single.go: -------------------------------------------------------------------------------- 1 | package natdm 2 | 3 | func single(n []int) (i int) { 4 | m := make(map[int]int) 5 | 6 | for _, v := range n { 7 | m[v]++ 8 | } 9 | for k, v := range m { 10 | if v == 1 { 11 | i = k 12 | break 13 | } 14 | } 15 | return 16 | } 17 | -------------------------------------------------------------------------------- /challenge_2/go/natdm/single_test.go: -------------------------------------------------------------------------------- 1 | package natdm 2 | 3 | import "testing" 4 | 5 | func TestSingle(t *testing.T) { 6 | if s := single([]int{2, 3, 4, 2, 3, 5, 4, 6, 4, 6, 9, 10, 9, 8, 7, 8, 10, 7}); s != 5 { 7 | t.Errorf("expected 5 but got %v", s) 8 | t.Fail() 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /challenge_2/haskell/halogenandtoast/src/Main.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import System.Environment (getArgs) 4 | import Challenge (solve) 5 | 6 | main :: IO () 7 | main = getArgs >>= (putStrLn . solve) 8 | -------------------------------------------------------------------------------- /challenge_2/javascript/Zirhc86/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Challenge_2|YoP 2017 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /challenge_2/javascript/phathousecat/README.md: -------------------------------------------------------------------------------- 1 | Open index.html in browser, open console 2 | 3 | If you would like to test a variable, in the console run the "unique" function (e.g. unique([1,2,3,4,4]) or unique("nope")) 4 | -------------------------------------------------------------------------------- /challenge_2/javascript/phathousecat/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /challenge_2/javascript/rawphs/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 2: Single Number 2 | 3 | ## Usage 4 | 5 | On your terminal, run: 6 | 7 | `$ node index.js` 8 | 9 | _optional_: You can pass an array and it will return the unique value of your custom sequence. 10 | 11 | `$ node index.js '[1, 2, 3, 2, 5, 6, 5, 6, 1]'` 12 | > 3 13 | -------------------------------------------------------------------------------- /challenge_2/postscript/moonpatroller/README.md: -------------------------------------------------------------------------------- 1 | split splits the input string on commas, putting each element on the stack, under the remainder of input string, 2 | then finally putting all of them into an array. 3 | counts them increments the count of each element of the array, in a dict. 4 | Finally, a loop iterates over the dict entries and prints out any values where the count is 1. 5 | -------------------------------------------------------------------------------- /challenge_2/python/CindyB/src/singleNumber.py: -------------------------------------------------------------------------------- 1 | def findSingleNumber(myArray): 2 | for x in myArray: 3 | count = sum(map(lambda s: s == x,myArray)) 4 | if count == 1: 5 | return x 6 | 7 | array = [2,'a','l',3,'l',4,'k',2,3,4,'a',6,'c',4,'m',6,'m','k',9,10,9,8,7,8,10,7] 8 | print findSingleNumber(array) 9 | -------------------------------------------------------------------------------- /challenge_2/python/Loran425/src/main.py: -------------------------------------------------------------------------------- 1 | __author__ = "Loran425" 2 | 3 | from collections import Counter 4 | 5 | def once(list): 6 | count = Counter(list) 7 | return [x for x in count.keys() if count[x] == 1] 8 | 9 | if __name__ == '__main__': 10 | array = [2, 3, 4, 2, 3, 5, 4, 6, 4, 6, 9, 10, 9, 8, 7, 8, 10, 7] 11 | print(' '.join(str(x) for x in once(array))) 12 | -------------------------------------------------------------------------------- /challenge_2/python/ajschrier/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 2 - Single Number 2 | 3 | Created a solution that checks a candidate list and a known incompatible list, but I don't think that it meets the time requirement. -------------------------------------------------------------------------------- /challenge_2/python/alexbotello/README.md: -------------------------------------------------------------------------------- 1 | # Single Number 2 | ###### Language Version (Python 3.6.0) 3 | 4 | ### Compile 5 | 6 | ``` 7 | python main.py 8 | ``` 9 | 10 | ### How to use 11 | 12 | First line of input is an int that will be the size of the array 13 | Subsequent input lines are the int values of your array 14 | Once finished with input the program will display the single number 15 | -------------------------------------------------------------------------------- /challenge_2/python/alexbotello/main.py: -------------------------------------------------------------------------------- 1 | if __name__ == '__main__': 2 | N = int(input()) # How many items in the list? 3 | array = [int(input()) for _ in range(N)] # Enter ints 4 | 5 | print("\nThe single number is ", end='') 6 | print(min(array, key=array.count)) 7 | -------------------------------------------------------------------------------- /challenge_2/python/bryantpq/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 3 2 | 3 | search_item.py 4 | Finds and prints out unique items in an array 5 | -------------------------------------------------------------------------------- /challenge_2/python/cactus/README.md: -------------------------------------------------------------------------------- 1 | Python 3.6 2 | 3 | On this challenge I used the Counter object from collections. Then cast the Counter object to a dict to find the lowest value (1). 4 | 5 | To run this program just write 'python challenge_2.py' on terminal. 6 | -------------------------------------------------------------------------------- /challenge_2/python/cactus/src/challenge_2.py: -------------------------------------------------------------------------------- 1 | from collections import Counter 2 | 3 | counter = Counter((2, 3, 4, 2, 3, 5, 4, 6, 4, 6, 9, 10, 9, 8, 7, 8, 10, 7)) 4 | dict_ = dict(counter) 5 | 6 | for k, v in dict_.items(): 7 | if v == 1: 8 | print(k) 9 | -------------------------------------------------------------------------------- /challenge_2/python/dfdx2/count.py: -------------------------------------------------------------------------------- 1 | from collections import Counter 2 | 3 | print(Counter([2,3,4,2,3,5,4,6,4,6,9,10,9,8,7,8,10,7]).most_common()[:-2:-1]) 4 | 5 | print(Counter([2,'a','l',3,'l',4,'k',2,3,4,'a',6,'c',4,'m',6,'m','k',9,10,9,8,7,8,10,7]).most_common()[:-2:-1]) -------------------------------------------------------------------------------- /challenge_2/python/flickdm/Readme.md: -------------------------------------------------------------------------------- 1 | #Challenge_2 2 | 3 | 4 | The code is mostly self documenting 5 | -------------------------------------------------------------------------------- /challenge_2/python/kar-moore/src/challenge2.py: -------------------------------------------------------------------------------- 1 | def single_number(array): 2 | num_dict = {} 3 | for num in array: 4 | if num in num_dict: 5 | num_dict[num] += 1 6 | else: 7 | num_dict[num] = 1 8 | 9 | for element in num_dict: 10 | if num_dict[element] == 1: 11 | return element 12 | 13 | print single_number([1,2,2,3,3,3,1,4]) 14 | -------------------------------------------------------------------------------- /challenge_2/python/lepmets/README.md: -------------------------------------------------------------------------------- 1 | # Challenge #2 in Python 2 | -------------------------------------------------------------------------------- /challenge_2/python/lex32pem/Readme.md: -------------------------------------------------------------------------------- 1 | # Challenge # 2 2 | # 2017 Programming Challenge @ Slack 3 | # 4 | # Single Number 5 | # by Lex32pem 6 | # Python 3.6 7 | -------------------------------------------------------------------------------- /challenge_2/python/mical/main.py: -------------------------------------------------------------------------------- 1 | #02/01/2017 2 | 3 | def noRepeats(things): 4 | for x in things: 5 | amount = list.count(x) 6 | if amount == 1: 7 | print(x) 8 | else: 9 | continue 10 | 11 | things = [2,'a','l',3,'l',4,'k',2,3,4,'a',6,'c',4,'m',6,'m','k',9,10,9,8,7,8,10,7] 12 | noRepeats(things) 13 | -------------------------------------------------------------------------------- /challenge_2/python/mindm/README.md: -------------------------------------------------------------------------------- 1 | # Challenge_2 2 | ## Single Number 3 | 4 | You can run it by typing the following on your command line: 5 | ``` 6 | $ python3 single.py [input] 7 | ``` 8 | Example usage: 9 | ``` 10 | $ python3 single.py [1,2,3,4,4,2,1] 11 | 3 12 | 13 | $ python3 single.py "[1, 2, k, 2, 1]" 14 | k 15 | ``` 16 | -------------------------------------------------------------------------------- /challenge_2/python/mrkwll/solution.py: -------------------------------------------------------------------------------- 1 | def singletons(array=[]): 2 | s = set([x for x in array if array.count(x) == 1]) 3 | for elem in s: 4 | print elem 5 | 6 | 7 | part1 = [2, 3, 4, 2, 3, 5, 4, 6, 4, 6, 9, 10, 9, 8, 7, 8, 10, 7] 8 | part2 = [2, 'a', 'l', 3, 'l', 4, 'k', 2, 3, 5, 4, 'a', 6, 'c', 4, 'm', 6, 'm', 'k', 9, 10, 9, 8, 7, 8, 10, 7] 9 | 10 | singletons(part1) 11 | singletons(part2) 12 | -------------------------------------------------------------------------------- /challenge_2/python/nebi/README.md: -------------------------------------------------------------------------------- 1 | ## Challenge 2 2 | 3 | More info in the code 4 | -------------------------------------------------------------------------------- /challenge_2/python/nebi/src/single_number.py: -------------------------------------------------------------------------------- 1 | """I have combine the two array in exemple from README.md in challenge_2""" 2 | 3 | 4 | def single(array): 5 | y = [] 6 | for x in array: 7 | if array.count(x) == 1: 8 | y.append(x) 9 | return (y) 10 | 11 | 12 | print(single(array = [2,'a','l',3,'l',4,'k',2,3,4,'a',6,'c',4,'m',6,'m','k',9,10,9,8,7,8,10,7,2,3,4,2,3,5,4,6,4,6,9,10,9,8,7,8,10,7])) 13 | 14 | -------------------------------------------------------------------------------- /challenge_2/python/phil-harmoniq/README.md: -------------------------------------------------------------------------------- 1 | This one is weird. Look at the second array you provided. There's no '5' in it? 2 | But the even weirder part is my program seems to find it anyway... x_X 3 | -------------------------------------------------------------------------------- /challenge_2/python/polar/README.md: -------------------------------------------------------------------------------- 1 | Python 3.6 2 | 3 | In this program, I use the Counter() function to count without using a for loop. This data is then put into a dictionary. Once in the dictionary, the keys and values are swapped. I then search for the key "1", and it returns five. -------------------------------------------------------------------------------- /challenge_2/python/polar/src/SingleDigit.py: -------------------------------------------------------------------------------- 1 | from collections import Counter 2 | dictionary = dict(Counter([2,3,4,2,3,5,4,6,4,6,9,10,9,8,7,8,10,7])) 3 | revdictionary = {value: key for key, value in dictionary.items()} 4 | print(revdictionary.get(1)) 5 | 6 | -------------------------------------------------------------------------------- /challenge_2/python/popcorn_anachronism/challenge_2.py: -------------------------------------------------------------------------------- 1 | array = list(input().split(",")) 2 | 3 | def find_single(array): 4 | for item in array: 5 | if array.count(item) == 1: 6 | return item 7 | 8 | print(find_single(array)) 9 | -------------------------------------------------------------------------------- /challenge_2/python/popcorn_anachronism/readme.md: -------------------------------------------------------------------------------- 1 | Given an array of numbers or letters, finds the one number/letter that is not repeated. 2 | Uses .count function in python 3. 3 | -------------------------------------------------------------------------------- /challenge_2/python/psonghi/README.md: -------------------------------------------------------------------------------- 1 | #Challenge 2 2 | 3 | ##Single Number 4 | 5 | Given an array of numbers or numbers and characters, find the unique element in the array. The other elements are repeated. 6 | -------------------------------------------------------------------------------- /challenge_2/python/psonghi/src/single_number.py: -------------------------------------------------------------------------------- 1 | def find_unique_element(array): 2 | for element in array: 3 | if array.count(element)==1: 4 | return element 5 | 6 | array = [2,3,4,2,3,5,4,6,4,6,9,10,9,8,7,8,10,7] 7 | print(find_unique_element(array)) 8 | 9 | array = [2,'a','l',3,'l',4,'k',2,3,4,'a',6,'c',4,'m',6,'m','k',9,10,9,8,7,8,10,7] 10 | print(find_unique_element(array)) 11 | -------------------------------------------------------------------------------- /challenge_2/python/py2k5/findNonRepeatNumber.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | arr = [2,3,4,3,5,4,6,4,6,9,10,9,2,8,7,8,10,7] 4 | 5 | dict1={} 6 | for elem in arr: 7 | dict1.setdefault(elem, 0) 8 | dict1[elem] = dict1.get(elem) + 1 9 | 10 | for a in dict1.keys(): 11 | if dict1.get(a) == 1: 12 | print a 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /challenge_2/python/returnlove/README.md: -------------------------------------------------------------------------------- 1 | Finds the single number in a list by counting all the instances in the list and returns only if the count only one. 2 | 3 | run: 4 | python single_number.py -------------------------------------------------------------------------------- /challenge_2/python/sarcodian/README.md: -------------------------------------------------------------------------------- 1 | Picking unique char from list assuming list is given as : 2 | 3 | pick_char([2,'a','l',3,'l',4,'k',2,3,4,'a',6,'c',4,'m',6,'m','k',9,10,9,8,7,8,10,7]) -------------------------------------------------------------------------------- /challenge_2/python/shaowen/single_n.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Wed Jan 4 10:39:39 2017 4 | 5 | @author: shaowen Liu 6 | """ 7 | 8 | def single_n(alist): 9 | n_dict = dict() 10 | for i in alist: 11 | n_dict[i] = n_dict.get(i,0) + 1 12 | return [k for k, v in n_dict.items() if v == 1] 13 | -------------------------------------------------------------------------------- /challenge_2/python/slandau/README.md: -------------------------------------------------------------------------------- 1 | Challenge 2, finding a single digit by Steven Landau 2 | -------------------------------------------------------------------------------- /challenge_2/python/slansford/README.md: -------------------------------------------------------------------------------- 1 | This program iterates through a given array and returns the occurence that does not repeat itself. Does not use any external libraries. Uses Python 3.6.0 -------------------------------------------------------------------------------- /challenge_2/python/slansford/src/challenge_2.py: -------------------------------------------------------------------------------- 1 | #prints the occurence that does not repeat 2 | #in the given array. Uses Python 3.6.0 3 | 4 | given_array = [2,'a','l',3,'l',4,'k',2,3,4,'a',6,'c',4,'m',6,'m','k',9,10,9,8,7,8,10,7] 5 | 6 | for i in given_array: 7 | if given_array.count(i) == 1: 8 | print(i) -------------------------------------------------------------------------------- /challenge_2/python/sysek/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 2 2 | ###### Python 3.6 3 | ### 1. Approch to solving the problem 4 | Challenge is to find non repeating number in list 5 | 6 | ### 2. How to run this code? 7 | ``` 8 | $ python3 src/singlenumber.py 9 | ``` 10 | ### 3. How this program works? 11 | Print non repeated number in output -------------------------------------------------------------------------------- /challenge_2/python/sysek/src/singlenumber.py: -------------------------------------------------------------------------------- 1 | from collections import Counter 2 | 3 | singlenumber = [2,3,4,2,3,5,4,6,4,6,9,10,9,8,7,8,10,7] 4 | cnt = Counter() #initialize Counter from collections 5 | 6 | for i in singlenumber: #count words in list 7 | cnt[i] += 1 8 | 9 | for i in singlenumber: 10 | if cnt[i] == 1: 11 | print(singlenumber[i]) 12 | 13 | -------------------------------------------------------------------------------- /challenge_2/python/system123/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YearOfProgramming/2017Challenges/a8f556f1d5b43c099a0394384c8bc2d826f9d287/challenge_2/python/system123/README.md -------------------------------------------------------------------------------- /challenge_2/python/system123/challenge2.py: -------------------------------------------------------------------------------- 1 | array = list(input().split(",")) 2 | 3 | def find_nodup(arr): 4 | s = {} 5 | ret = [] 6 | 7 | for x in arr: 8 | if x in s.keys(): 9 | s[x] += 1 10 | else: 11 | s[x] = 1 12 | 13 | for k, v in s.items(): 14 | if v == 1: 15 | ret.append(k) 16 | 17 | return(ret) 18 | 19 | print(find_nodup(array)) 20 | -------------------------------------------------------------------------------- /challenge_2/python/tvanderwal/README.md: -------------------------------------------------------------------------------- 1 | Challenge 2 2 | 3 | Create a program that will report any values in a list that DO NOT repeat 4 | 5 | 6 | NOTE: Done with python 3.5 -------------------------------------------------------------------------------- /challenge_2/python/tvanderwal/src/challenge_2.py: -------------------------------------------------------------------------------- 1 | from collections import Counter 2 | #extra credit list 3 | # Added 5 to the end so the expected output in instructions would be correct 4 | myList = (2,'a','l',3,'l',4,'k',2,3,4,'a',6,'c',4,'m',6,'m','k',9,10,9,8,7,8,10,7,5) 5 | 6 | #use counter to see if item is repeated and a list comprehension to store them 7 | print([k for k, v in Counter(myList).items() if v == 1]) -------------------------------------------------------------------------------- /challenge_2/python/ukirderohit/README.md: -------------------------------------------------------------------------------- 1 | Challenge 2 2 | 3 | Create a program that will report any values in a list that DO NOT repeat 4 | 5 | 6 | NOTE: Done with python 2.3 -------------------------------------------------------------------------------- /challenge_2/python/ukirderohit/c2.py: -------------------------------------------------------------------------------- 1 | # list1 = [2,3,4,2,3,5,4,6,4,6,9,10,9,8,7,8,10,7] 2 | list1 = [2,'a','l',3,'l',4,'k',2,3,4,'a',6,'c',4,'m',6,'m','k',9,10,9,8,7,8,10,7,5] #extra credit 3 | 4 | for index in range(0,len(list1)): 5 | if list1.count(index) == 1: 6 | print index -------------------------------------------------------------------------------- /challenge_2/python/walkingluo/README.md: -------------------------------------------------------------------------------- 1 | ## Challenge_2 2 | 3 | - single number -------------------------------------------------------------------------------- /challenge_2/python/whiterd/README.md: -------------------------------------------------------------------------------- 1 | 2 | Input: a list of integers. 3 | 4 | Output: the only non-repeated integer. -------------------------------------------------------------------------------- /challenge_2/r/aev1tas/uniquevalue.R: -------------------------------------------------------------------------------- 1 | input <- c(2,"a","l",3,"l",4,"k",2,3,5,4,"a",6,"c",4,"m",6,"m","k",9,10,9,8,7,8,10,7) 2 | tab.input <- table(input[!is.na(as.numeric(input))]) 3 | names(tab.input)[tab.input <= 1] 4 | -------------------------------------------------------------------------------- /challenge_2/r/henriquefb/README.md: -------------------------------------------------------------------------------- 1 | This is my solution for the second challenge using R. 2 | It should run in interactive mode in R/Rstudio or as 3 | a standalone script, run by $ Rscript from terminal. 4 | As always, suggestions and comments are very welcome. 5 | -------------------------------------------------------------------------------- /challenge_2/ruby/ConorWright/unique_int.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby 2 | 3 | input = [2,3,4,2,3,5,4,6,4,6,9,10,9,8,7,8,10,7] 4 | input_chars = [2,'a','l',3,'l',4,'k',2,3,4,'a',6,'c',4,'m',6,'m','k',9,10,9,8,7,8,10,7] 5 | 6 | output = input.group_by{|i| i}.to_h.min_by{|k,v| v.count}.first 7 | output_chars = input_chars.group_by{|i| i}.to_h.min_by{|k,v| v.count}.first 8 | 9 | puts output 10 | puts output_chars 11 | -------------------------------------------------------------------------------- /challenge_2/ruby/selectivealso/methods.rb: -------------------------------------------------------------------------------- 1 | class UniqueFinder 2 | def initialize array 3 | @array = array 4 | end 5 | 6 | def find_unique 7 | counts.key(1) 8 | end 9 | 10 | private 11 | 12 | attr_reader :array 13 | 14 | def counts 15 | array.each_with_object(Hash.new(0)) { |element, hash| hash[element] += 1 } 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /challenge_2/ruby/selectivealso/single_number.rb: -------------------------------------------------------------------------------- 1 | require './methods.rb' 2 | nums = UniqueFinder.new([2,3,4,2,3,5,4,6,4,6,9,10,9,8,7,8,10,7]) 3 | puts nums.find_unique 4 | -------------------------------------------------------------------------------- /challenge_2/rust/deg4uss3r/challenge_2/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "challenge_2" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_2/rust/deg4uss3r/challenge_2/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "challenge_2" 3 | version = "0.1.0" 4 | authors = ["deg4uss3r"] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_2/rust/deg4uss3r/challenge_2/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 2 2 | use `cargo test` to run tests 3 | 4 | # To use 5 | ``` 6 | extern crate challenge_2; 7 | use challenge_2::find_lonely; 8 | 9 | let x: u64 = find_lonely(vec); (returns u64) 10 | ``` 11 | 12 | # I can't do mixed arrarys in Rust easily! No extra credit for me :( 13 | it's super safe 14 | -------------------------------------------------------------------------------- /challenge_2/rust/josephpd3/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "josephpd3" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_2/rust/josephpd3/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "josephpd3" 3 | version = "0.1.0" 4 | authors = ["Joseph P DeBartola III "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_2/rust/makernaren/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "makernaren" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_2/rust/makernaren/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "makernaren" 3 | version = "0.1.0" 4 | authors = ["naren "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_2/rust/makernaren/src/main.rs: -------------------------------------------------------------------------------- 1 | mod single_number; 2 | fn main() { 3 | // let input = vec!['a', 'a', 'b', 'b', 'c', 'c', 'd']; 4 | let input = vec![1, 1, 2, 2, 3, 3, 5]; 5 | println!("Given array is {:?} \n Single occurance : {}",input.clone(), single_number::find_single(input)); 6 | 7 | } -------------------------------------------------------------------------------- /challenge_2/rust/myrrlyn/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "myrrlyn" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_2/rust/myrrlyn/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "myrrlyn" 3 | version = "0.1.0" 4 | authors = ["myrrlyn "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_2/scala/ndsmith3/README.md: -------------------------------------------------------------------------------- 1 | Single Number 2 | --- 3 | 4 | Algorithm reads through each element of array, and when it encounters a non-unique element, it removes all proceding occurences of that element. Works with any type. 5 | -------------------------------------------------------------------------------- /challenge_2/scala/ndsmith3/SingleNumber.scala: -------------------------------------------------------------------------------- 1 | object SingleNumber { 2 | def unique(elems: Array[Any], soln: List[Any] = Nil): List[Any] = { 3 | elems.length match { 4 | case 0 => soln 5 | case _ if elems.tail.contains(elems.head) => 6 | unique(elems.filter(_ != elems.head), soln) 7 | case _ => unique(elems.tail, elems.head :: soln) 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /challenge_2/testfiles/o1: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /challenge_2/testfiles/o2: -------------------------------------------------------------------------------- 1 | 4 2 | -------------------------------------------------------------------------------- /challenge_2/testfiles/o3: -------------------------------------------------------------------------------- 1 | 151 2 | -------------------------------------------------------------------------------- /challenge_2/testfiles/o4: -------------------------------------------------------------------------------- 1 | 151 2 | -------------------------------------------------------------------------------- /challenge_2/testfiles/o5: -------------------------------------------------------------------------------- 1 | 151 2 | -------------------------------------------------------------------------------- /challenge_2/testfiles/t1: -------------------------------------------------------------------------------- 1 | 2, 3, 4, 2, 3, 5, 4, 6, 4, 6, 9, 10, 9, 8, 7, 8, 10, 7 2 | -------------------------------------------------------------------------------- /challenge_2/testfiles/t2: -------------------------------------------------------------------------------- 1 | 86, 9, 147, 29, 17, 0, 69, 67, 92, 86, 9, 147, 29, 17, 0, 69, 67, 92, 4 2 | -------------------------------------------------------------------------------- /challenge_2/testfiles/t3: -------------------------------------------------------------------------------- 1 | 9, 1, 72, 108, 83, 143, 130, 107, 10, 35, 9, 1, 72, 108, 83, 143, 130, 107, 10, 35, 9, 1, 72, 108, 83, 143, 130, 107, 10, 35, 9, 1, 72, 108, 83, 143, 130, 107, 10, 35, 151 2 | -------------------------------------------------------------------------------- /challenge_3/C/karanchawla/src/README.md: -------------------------------------------------------------------------------- 1 | ''' 2 | Karan Chawla 3 | Challenge 3 4 | ''' 5 | 6 | Implemented Moore's voting algorithm, can also be done by implementing a method that creates a count of each element and then checking for the element with a frequency > n/2.(this takes up extra space though). 7 | Current Implementation: Time Complexity: O(n) 8 | Space Complexity: O(1) 9 | 10 | 11 | Peace. -------------------------------------------------------------------------------- /challenge_3/cpp/blakebarnes00/Makefile: -------------------------------------------------------------------------------- 1 | CXX = g++ 2 | FLG = -w -std=c++11 3 | 4 | EXE = challenge_3 5 | SRC = main.cpp 6 | 7 | all: 8 | $(CXX) $(FLG) -o $(EXE) ./src/$(SRC) 9 | 10 | clean: 11 | -rm $(EXE) 12 | -------------------------------------------------------------------------------- /challenge_3/cpp/manuel/src/include/majorityElement.h: -------------------------------------------------------------------------------- 1 | #ifndef MAJORITYELEMENT_H 2 | #define MAJORITYELEMENT_H 3 | 4 | int findMax (std::vector); 5 | std::vector stringToDigits (std::string); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /challenge_3/cpp/rbrt/README.md: -------------------------------------------------------------------------------- 1 | In this code we accept as input an array. We read it counting checking each element and 2 | increasing a counter for each element. 3 | When a counter is > than n/2 we have found the element of interest. -------------------------------------------------------------------------------- /challenge_3/elixir/joegotflow83/majority_element/test/test_helper.exs: -------------------------------------------------------------------------------- 1 | ExUnit.start() 2 | -------------------------------------------------------------------------------- /challenge_3/go/natdm/majority.go: -------------------------------------------------------------------------------- 1 | package natdm 2 | 3 | func majority(n []int) (i int) { 4 | m := make(map[int]int) 5 | 6 | for _, v := range n { 7 | m[v]++ 8 | } 9 | 10 | for k, v := range m { 11 | if v > m[i] { 12 | i = k 13 | } 14 | } 15 | return 16 | } 17 | -------------------------------------------------------------------------------- /challenge_3/go/natdm/majority_test.go: -------------------------------------------------------------------------------- 1 | package natdm 2 | 3 | import "testing" 4 | 5 | func TestMajority(t *testing.T) { 6 | m := majority([]int{2, 2, 3, 7, 5, 7, 7, 7, 4, 7, 2, 7, 4, 5, 6, 7, 7, 8, 6, 7, 7, 8, 10, 12, 29, 30, 19, 7, 7, 7, 7, 7, 7, 7, 7, 7, 10}) 7 | if m != 7 { 8 | t.Error("expected 7") 9 | t.Fail() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /challenge_3/go/rchicoli/src/majority_element_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "testing" 4 | 5 | func TestFindMajority(t *testing.T) { 6 | 7 | if output := findMajority([]int{2, 2, 3, 7, 5, 7, 7, 7, 4, 7, 2, 7, 4, 5, 6, 7, 7, 8, 6, 7, 7, 8, 10, 12, 29, 30, 19, 10, 7, 7, 7, 7, 7, 7, 7, 7, 7}); output != 7 { 8 | t.Errorf("expected 7, got: %d\n", output) 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /challenge_3/haskell/halogenandtoast/src/Main.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import System.Environment ( getArgs ) 4 | import Challenge ( findMajority ) 5 | 6 | main :: IO () 7 | main = getArgs >>= (putStrLn . findMajority) 8 | -------------------------------------------------------------------------------- /challenge_3/javascript/Zirhc86/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Challenge_3|YoP 2017 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /challenge_3/javascript/rawphs/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 3: Majority Element 2 | 3 | ## Usage 4 | 5 | On your terminal, run: 6 | 7 | `node index.js` 8 | 9 | _optional_: You can pass a custom array on your command line. If no majority is found, it returns `undefined`. 10 | 11 | `node index.js '[1, 2, 2, 2, 2, 3, 4]'` 12 | >2 -------------------------------------------------------------------------------- /challenge_3/postscript/moonpatroller/README.md: -------------------------------------------------------------------------------- 1 | split splits the input string on commas, putting each element on the stack, under the remainder of input string, 2 | then finally putting all of them into an array. 3 | counts them increments the count of each element of the array, in a dict. 4 | Finally, a loop iterates over the dict entries and prints out any values where the count is the majority. 5 | -------------------------------------------------------------------------------- /challenge_3/python/CindyB/src/majorityElement.py: -------------------------------------------------------------------------------- 1 | def findMajorityElement(myArray): 2 | for x in myArray: 3 | count = sum(map(lambda s: s == x,myArray)) 4 | if count > len(myArray)//2: 5 | return x 6 | array = [2,2,3,7,5,7,7,7,4,7,2,7,4,5,6,7,7,8,6,7,7,8,10,12,29,30,19,10,7,7,7,7,7,7,7,7,7] 7 | print findMajorityElement(array) 8 | -------------------------------------------------------------------------------- /challenge_3/python/ajschrier/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 3 - Majority Element 2 | 3 | This uses the list.count builtin to find out how many of each element exists in the list. If the given element meets the condition (count > len/2), then that element is printed to the console and the loop breaks. 4 | 5 | I feel like I save some time by breaking the loop but there may be a more efficient way to do this. I'll probably revisit this in the future. -------------------------------------------------------------------------------- /challenge_3/python/ajschrier/challenge_3.py: -------------------------------------------------------------------------------- 1 | array = [2, 2, 3, 7, 5, 7, 7, 7, 4, 7, 2, 7, 4, 5, 6, 7, 7, 8, 6, 7, 7, 8, 10, 2 | 12, 29, 30, 19, 10, 7, 7, 7, 7, 7, 7, 7, 7, 7] 3 | 4 | for i in array: 5 | if array.count(i) > len(array) / 2: 6 | print i 7 | break 8 | -------------------------------------------------------------------------------- /challenge_3/python/alexbotello/README.md: -------------------------------------------------------------------------------- 1 | # Majority Element 2 | ###### Language Version (Python 3.6.0) 3 | 4 | ### Compile 5 | 6 | ``` 7 | python main.py 8 | ``` 9 | 10 | ### How to use 11 | 12 | First line of input is an int that will be the size of the array 13 | Subsequent input lines are the int values of your array 14 | Once finished with input the program will display the majority element 15 | -------------------------------------------------------------------------------- /challenge_3/python/alexbotello/main.py: -------------------------------------------------------------------------------- 1 | from collections import Counter 2 | 3 | if __name__ == "__main__": 4 | N = int(input()) 5 | array = [input() for _ in range(N)] 6 | 7 | print('\nThe most common number is ', end='') 8 | print(list(dict(Counter(array).most_common()))[0]) 9 | 10 | -------------------------------------------------------------------------------- /challenge_3/python/bryantpq/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 3 2 | find_majority.py 3 | Finds the majority element in an array 4 | -------------------------------------------------------------------------------- /challenge_3/python/dfdx2/challenge_3.py: -------------------------------------------------------------------------------- 1 | # Count elements in an array and return the element that has been counted the most 2 | from statistics import mode 3 | 4 | print(mode([2,2,3,7,5,7,7,7,4,7,2,7,4,5,6,7,7,8,6,7,7,8,10,12,29,30,19,10,7,7,7,7,7,7,7,7,7])) 5 | 6 | 7 | -------------------------------------------------------------------------------- /challenge_3/python/hkl0902/Challenge_3.py: -------------------------------------------------------------------------------- 1 | import math 2 | from collections import Counter 3 | lst = [2,2,3,7,5,7,7,7,4,7,2,7,4,5,6,7,7,8,6,7,7,8,10,12,29,30,19,10,7,7,7,7,7,7,7,7,7] 4 | 5 | c = Counter(lst) 6 | n = len(lst) 7 | 8 | def findMajorityElement(): 9 | for key, val in c.items(): 10 | if val >= math.floor(n/2): 11 | return key 12 | -------------------------------------------------------------------------------- /challenge_3/python/lepmets/README.md: -------------------------------------------------------------------------------- 1 | # Challenge #3 in Python 2 | -------------------------------------------------------------------------------- /challenge_3/python/lex32pem/readme.md: -------------------------------------------------------------------------------- 1 | # Challenge #3 in Python 2 | # Created in Python 3.6 3 | -------------------------------------------------------------------------------- /challenge_3/python/mindm/README.md: -------------------------------------------------------------------------------- 1 | # Challenge_3 2 | ## Majority Element 3 | This program will find the majority element from an array. 4 | 5 | You can run it by typing the following on your command line: 6 | ``` 7 | $ python3 majority.py [input] 8 | ``` 9 | Example: 10 | ``` 11 | $ python3 majority.py [1,2,1,2,3,2,2] 12 | 2 13 | ``` 14 | -------------------------------------------------------------------------------- /challenge_3/python/ning/challenge_3.py: -------------------------------------------------------------------------------- 1 | from collections import Counter 2 | 3 | test_sequence_list = [2,2,3,7,5,7,7,7,4,7,2,7,4,5,6,7,7,8,6,7,7,8,10,12,29,30,19,10,7,7,7,7,7,7,7,7,7] 4 | print(Counter(test_sequence_list).most_common(1)[0][0]) 5 | -------------------------------------------------------------------------------- /challenge_3/python/phil-harmoniq/challenge_3.py: -------------------------------------------------------------------------------- 1 | from collections import Counter 2 | 3 | int_array = [2, 2, 3, 7, 5, 7, 7, 7, 4, 7, 2, 7, 4, 5, 6, 7, 7, 8, 6, 7, 4 | 7, 8, 10, 12, 29, 30, 19, 10, 7, 7, 7, 7, 7, 7, 7, 7, 7] 5 | 6 | count = Counter(int_array) 7 | answer = count.most_common() 8 | 9 | print(answer[0][0]) 10 | -------------------------------------------------------------------------------- /challenge_3/python/returnlove/README.md: -------------------------------------------------------------------------------- 1 | Finds the majority element in a list by counting all the instances in the list and retuns only if the 2 | count is more than half size of the list. 3 | 4 | run: 5 | python majority_element.py -------------------------------------------------------------------------------- /challenge_3/python/sarcodian/src/challenge_3.py: -------------------------------------------------------------------------------- 1 | def majority(array0): 2 | store = {} 3 | for i in array0: 4 | store[i] = store.get(i,0) + 1 5 | 6 | for i in store.keys(): 7 | if store[i] > len(array0)//2: 8 | return i 9 | print('No majority found') 10 | -------------------------------------------------------------------------------- /challenge_3/python/shaowen/majority_element.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Wed Jan 4 10:50:52 2017 4 | 5 | @author: shaowen Liu 6 | """ 7 | 8 | def majority_element(alist): 9 | n_dict = dict() 10 | for i in alist: 11 | n_dict[i] = n_dict.get(i,0) + 1 12 | return [k for k, v in n_dict.items() if v > len(alist)//2] -------------------------------------------------------------------------------- /challenge_3/python/slandau/README.md: -------------------------------------------------------------------------------- 1 | Challange 3 in Python by Steven Landau 2 | -------------------------------------------------------------------------------- /challenge_3/python/slansford/README.md: -------------------------------------------------------------------------------- 1 | This program iterates through a given array and prints the majority occurence, where majority is equal to n/2 and n is equal to the length of the array. Uses Python 3.6.0 -------------------------------------------------------------------------------- /challenge_3/python/slansford/src/challenge_3.py: -------------------------------------------------------------------------------- 1 | given_array = [2,2,3,7,5,7,7,7,4,7,2,7,4,5,6,7,7,8,6,7,7,8,10,12,29,30,19,10,7,7,7,7,7,7,7,7,7] 2 | 3 | for i in given_array: 4 | if given_array.count(i) > len(given_array)/2: 5 | print(i) 6 | break 7 | 8 | -------------------------------------------------------------------------------- /challenge_3/python/sysek/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 3 2 | ###### Python 3.6 3 | ### 1. Approch to solving the problem 4 | Find majority number in list 5 | 6 | ### 2. How to run this code? 7 | ``` 8 | $ python3 src/majority.py 9 | ``` 10 | ### 3. How this program works? 11 | Print majority number -------------------------------------------------------------------------------- /challenge_3/python/system123/README.md: -------------------------------------------------------------------------------- 1 | Run using Python 3 2 | 3 | python3 challenge3.py 4 | 5 | Then enter a CSV list of integers when prompted -------------------------------------------------------------------------------- /challenge_3/python/system123/challenge3.py: -------------------------------------------------------------------------------- 1 | 2 | def find_majority(arr): 3 | n = len(arr) 4 | hist = {} 5 | 6 | for x in arr: 7 | if x in hist.keys(): 8 | hist[x] += 1 9 | if hist[x] >= n/2: 10 | return(x) 11 | else: 12 | hist[x] = 1 13 | 14 | data = list(input("Input CSV data: ").split(",")) 15 | print( find_majority(data) ) 16 | -------------------------------------------------------------------------------- /challenge_3/python/tvanderwal/src/challenge_3.py: -------------------------------------------------------------------------------- 1 | #Get counter to count the items in our list 2 | from collections import Counter 3 | 4 | #given list for challenge 5 | myList = (2,2,3,7,5,7,7,7,4,7,2,7,4,5,6,7,7,8,6,7,7,8,10,12,29,30,19,10,7,7,7,7,7,7,7,7,7) 6 | 7 | #Use a list comprehension and only grab an item if it makes up more than half the items 8 | print([k for k,v in Counter(myList).items() if v > len(myList)/2]) 9 | 10 | -------------------------------------------------------------------------------- /challenge_3/python/whiterd/README.md: -------------------------------------------------------------------------------- 1 | Find Majority Element 2 | --------------------- 3 | 4 | * Given an array of size n, find the majority element. The majority element is the element that appears more than n/2 times. 5 | 6 | * Assume: 7 | * the array is non-empty. 8 | * the majority element always exist in the array. -------------------------------------------------------------------------------- /challenge_3/r/aev1tas/MajorityElement.R: -------------------------------------------------------------------------------- 1 | input <- c(2,2,3,7,5,7,7,7,4,7,2,7,4,5,6,7,7,8,6,7,7,8,10,12,29,30,19,10,7,7,7,7,7,7,7,7,7) 2 | names(table(input))[table(input) >length(table(input))/2] 3 | -------------------------------------------------------------------------------- /challenge_3/ruby/selectivealso/readme.md: -------------------------------------------------------------------------------- 1 | ## Find the Majority 2 | Make a `count` hash, with a default value of `0` 3 | iterate through the `nums` array, and count how many times each integer occurred in the array. 4 | Get the element with the highest value, and output the key and value. The key is the majority integer and the value is the number of times it occurred -------------------------------------------------------------------------------- /challenge_3/rust/deg4uss3r/challenge_3/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "challenge_3" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_3/rust/deg4uss3r/challenge_3/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "challenge_3" 3 | version = "0.1.0" 4 | authors = ["deg4uss3r "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_3/rust/deg4uss3r/challenge_3/tests/main.rs: -------------------------------------------------------------------------------- 1 | extern crate challenge_3; 2 | use challenge_3::majority_finder; 3 | 4 | #[test] 5 | fn find_example() { 6 | let t = vec!(2,2,3,7,5,7,7,7,4,7,2,7,4,5,6,7,7,8,6,7,7,8,10,12,29,30,19,10,7,7,7,7,7,7,7,7,7); 7 | assert_eq!(majority_finder(t),7); 8 | } 9 | -------------------------------------------------------------------------------- /challenge_3/rust/myrrlyn/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "myrrlyn" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_3/rust/myrrlyn/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "myrrlyn" 3 | version = "0.1.0" 4 | authors = ["myrrlyn "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_3/scala/ndsmith3/README.md: -------------------------------------------------------------------------------- 1 | Majority Element 2 | --- 3 | 4 | - Generic 5 | 6 | Scans array and removes all elements whose occurances are less than the majority threshold (length / 2). Returns head of remaining array. 7 | -------------------------------------------------------------------------------- /challenge_3/testfiles/o1: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /challenge_3/testfiles/o2: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /challenge_3/testfiles/o3: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /challenge_3/testfiles/o4: -------------------------------------------------------------------------------- 1 | 141 2 | -------------------------------------------------------------------------------- /challenge_3/testfiles/o5: -------------------------------------------------------------------------------- 1 | 29351 2 | -------------------------------------------------------------------------------- /challenge_3/testfiles/t1: -------------------------------------------------------------------------------- 1 | 2,2,3,7,5,7,7,7,4,7,2,7,4,5,6,7,7,8,6,7,7,8,10,12,29,30,19,10,7,7,7,7,7,7,7,7,7 2 | -------------------------------------------------------------------------------- /challenge_3/testfiles/t5: -------------------------------------------------------------------------------- 1 | 14757,46062,29351,29351,42027,29351,46062,14757,48596,29351,29351,29351,29351,29351 2 | -------------------------------------------------------------------------------- /challenge_4/c/karanchawla/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | Karan Chawla 3 | Challenge 4 4 | ``` 5 | This was an easy question where I just recursively called the left and the right nodes to switch the pointers. Rest of the work was done in writing the utility 6 | functions for the tree. -------------------------------------------------------------------------------- /challenge_4/cpp/manuel/src/input: -------------------------------------------------------------------------------- 1 | 3 2 | 1,2,3,4,5,6,7 3 | 4,2,7,1,3,6,9 4 | 1,2,3 5 | -------------------------------------------------------------------------------- /challenge_4/haskell/halogenandtoast/src/Challenge.hs: -------------------------------------------------------------------------------- 1 | module Challenge where 2 | 3 | data Tree a = Node a (Tree a) (Tree a) | Empty 4 | deriving (Show, Eq) 5 | 6 | invert :: Tree a -> Tree a 7 | invert Empty = Empty 8 | invert (Node v l r) = Node v (invert r) (invert l) 9 | -------------------------------------------------------------------------------- /challenge_4/java/jdfurlan/src/Node.java: -------------------------------------------------------------------------------- 1 | 2 | public class Node { 3 | int data; 4 | Node left; 5 | Node right; 6 | public Node(int data){ 7 | this.data = data; 8 | left = null; 9 | right = null; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /challenge_4/javascript/Zirhc86/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Challenge_4|YoP 2017 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /challenge_4/python/CindyB/src/Challenge4.py: -------------------------------------------------------------------------------- 1 | from Tree import Tree 2 | from TreeNode import TreeNode 3 | 4 | input = [4,2,7,1,3,6,9] 5 | my_tree = Tree(TreeNode(input[0])) 6 | input.remove(input[0]) 7 | 8 | for value in input: 9 | my_tree.insert(value) 10 | 11 | my_tree.print_tree() 12 | my_tree.invert_tree() 13 | my_tree.print_tree() -------------------------------------------------------------------------------- /challenge_4/python/Loran425/README.md: -------------------------------------------------------------------------------- 1 | ## Implementation 2 | 3 | - Provides a `Node` class that has a left and right hand branch 4 | - `Node` has a member function `reverse()` such that the left and right hand branches of the node are swapped. 5 | If the `recursive` flag is set to `True` (e.g. `reverse(recursive=True)` ) then all nodes below the calling node will be reversed. 6 | -------------------------------------------------------------------------------- /challenge_4/python/OkraArmband/tree.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YearOfProgramming/2017Challenges/a8f556f1d5b43c099a0394384c8bc2d826f9d287/challenge_4/python/OkraArmband/tree.jpg -------------------------------------------------------------------------------- /challenge_4/python/OkraArmband/treeReversed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YearOfProgramming/2017Challenges/a8f556f1d5b43c099a0394384c8bc2d826f9d287/challenge_4/python/OkraArmband/treeReversed.jpg -------------------------------------------------------------------------------- /challenge_4/python/bryantpq/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 4 2 | tree.py 3 | Creates the node and binary tree structures. 4 | Creates and inverts the given binary tree 5 | -------------------------------------------------------------------------------- /challenge_4/python/mindm/README.md: -------------------------------------------------------------------------------- 1 | # Challenge_4 2 | ## Invert Binary Tree 3 | This program will Inverse a given binary tree. The code resides in ``btree.py`` and test in ``test_invert.py``. The tree also has a method for calculating its depth but you can forget about it. 4 | 5 | You can run it by typing the following on your command line: 6 | ``` 7 | $ python3 test_invert.py 8 | ``` 9 | -------------------------------------------------------------------------------- /challenge_4/python/popcorn_anachronism/readme.md: -------------------------------------------------------------------------------- 1 | (Python 3) 2 | Inverts a binary tree. Also prints a visualized tree of before and after inversion 3 | with two examples, one symmetric and one asymmetric. 4 | -------------------------------------------------------------------------------- /challenge_4/python/shaowen/README.md: -------------------------------------------------------------------------------- 1 | Example: 2 | 3 | root = Node(4) 4 | # set up binary tree 5 | for node in [Node(2),Node(7), Node(1), Node(3), Node(6), Node(9)]: 6 | bi_insert(root,node) 7 | 8 | # reverse binary tree 9 | rev_tree(root) 10 | -------------------------------------------------------------------------------- /challenge_4/python/slandau/README.md: -------------------------------------------------------------------------------- 1 | Challenge 4 in Python by Steven Landau 2 | -------------------------------------------------------------------------------- /challenge_4/python/slansford/README.md: -------------------------------------------------------------------------------- 1 | This program contructs a binary tree with values provided in the program, prints the value of a specific node, inverts the tree, and then prints the new value of the same node. Uses Python 3.6.0 -------------------------------------------------------------------------------- /challenge_4/python/slansford/src/README.md: -------------------------------------------------------------------------------- 1 | This program contructs a binary tree with values provided in the program, prints the value of a specific node, inverts the tree, and then prints the new value of the same node. Uses Python 3.6.0 -------------------------------------------------------------------------------- /challenge_4/python/system123/README.md: -------------------------------------------------------------------------------- 1 | Uses Python 3.5 2 | 3 | Creates a binary tree then inverts the tree -------------------------------------------------------------------------------- /challenge_4/python/tvanderwal/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 4 2 | 3 | ## Invert Binary Tree 4 | 5 | ### Use: 6 | - Call function to take a binary tree and reverse it 7 | - Must work on a tree of any size 8 | 9 | ### NOTE: 10 | - Done with Python 3.5 11 | - Originally was going to use printTree() but I didn't like displaying it in the classic 1 node per line. Easier to see what's going on printing as a tree 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /challenge_4/python/whiterd/README.md: -------------------------------------------------------------------------------- 1 | # Invert Binary Tree 2 | 3 | * Take in a binary tree object. 4 | 5 | * For each level in the tree, reverse the order of the items in that level (mirror). 6 | 7 | * Return the node object. -------------------------------------------------------------------------------- /challenge_4/python/whiterd/src/invert_bin.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | ''' 4 | Input: An object consisting of a binary tree. 5 | 6 | Output: The same tree with values mirrored. 7 | ''' 8 | 9 | def mirror(node): 10 | if node: 11 | mirror(node.left) 12 | mirror(node.right) 13 | node.left, node.right = node.right, node.left 14 | 15 | return node 16 | -------------------------------------------------------------------------------- /challenge_4/python/wost/main.py: -------------------------------------------------------------------------------- 1 | from Node import Tree 2 | from Node import Node 3 | 4 | def main(): 5 | tree = Tree(2) 6 | 7 | tree += [1, 2, 3] 8 | 9 | tree.print_simple() 10 | tree.invert(tree._root) 11 | tree.print_simple() 12 | 13 | if __name__ == "__main__": 14 | main() 15 | -------------------------------------------------------------------------------- /challenge_4/scala/ndsmith3/README.md: -------------------------------------------------------------------------------- 1 | Tree Inversion 2 | --- 3 | 4 | Generic implementation of a tree, with a value inverted. 5 | 6 | Example is from challenge readme with Ints. 7 | -------------------------------------------------------------------------------- /challenge_4/tree.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YearOfProgramming/2017Challenges/a8f556f1d5b43c099a0394384c8bc2d826f9d287/challenge_4/tree.jpg -------------------------------------------------------------------------------- /challenge_4/treeReversed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YearOfProgramming/2017Challenges/a8f556f1d5b43c099a0394384c8bc2d826f9d287/challenge_4/treeReversed.jpg -------------------------------------------------------------------------------- /challenge_5/cpp/manuel/src/include/findTheDifference.h: -------------------------------------------------------------------------------- 1 | #ifndef FINDTHEDIFFERENCE_H 2 | #define FINDTHEDIFFERENCE_H 3 | 4 | int findMax (std::string); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /challenge_5/cpp/rbrt/README.md: -------------------------------------------------------------------------------- 1 | The code accept two lists . 2 | The second one is a shuffled version of the first one with an additional char. 3 | 4 | The code look for this additional char. 5 | In order to minimize the complexity of the search we sort the two list. 6 | Once sorted the problem is solved looking for the first difference between the two. -------------------------------------------------------------------------------- /challenge_5/elixir/joegotflow83/find_difference/test/test_helper.exs: -------------------------------------------------------------------------------- 1 | ExUnit.start() 2 | -------------------------------------------------------------------------------- /challenge_5/java/hkl0902/Makefile: -------------------------------------------------------------------------------- 1 | SRCS := $(wildcard *.java) 2 | COMPILED := $(wildcard *.class) 3 | 4 | CPATH = "..:$(CLASSPATH):" 5 | 6 | JFLAGS = -g -Xlint:unchecked -Xlint:deprecation 7 | 8 | default: 9 | javac $(JFLAGS) -cp $(CLASSPATH) $(SRCS) 10 | 11 | check: 12 | java -ea -cp $(CLASSPATH) UnitTest 13 | -------------------------------------------------------------------------------- /challenge_5/postscript/moonpatroller/README.md: -------------------------------------------------------------------------------- 1 | Find the Difference 2 | --- 3 | 4 | Sort both strings, since description said the second string was the first one shuffled with an extra character. 5 | Then iterating through the 2 strings with show you the added character. 6 | -------------------------------------------------------------------------------- /challenge_5/python/ajschrier/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 5 - Find the Difference 2 | 3 | *Python Version:* 2.7 4 | 5 | Counts all the characters in a string and finds the added letter 6 | 7 | ## Functions 8 | 9 | ### FindTheDifference 10 | 11 | Creates a counter from each of the strings, and compares the character count. The one that doesn't match gets returned. -------------------------------------------------------------------------------- /challenge_5/python/bryantpq/FindTheDifference.py: -------------------------------------------------------------------------------- 1 | from collections import Counter 2 | 3 | class Solution: 4 | def findTheDifference(self, s, t): 5 | s = Counter(s) 6 | t = Counter(t) 7 | 8 | for i in t: 9 | if s[i] == 0 or t[i] != s[i]: 10 | return i 11 | 12 | -------------------------------------------------------------------------------- /challenge_5/python/mindm/README.md: -------------------------------------------------------------------------------- 1 | # Challenge_5 2 | ## Find the Difference 3 | This method will find the difference in two strings! 4 | 5 | You can run tests with: 6 | ``` 7 | $ python3 test.py 8 | ``` 9 | -------------------------------------------------------------------------------- /challenge_5/python/sarcodian/README.md: -------------------------------------------------------------------------------- 1 | Finds the added char in t when compared to s using dictionaries -------------------------------------------------------------------------------- /challenge_5/python/slandau/README.md: -------------------------------------------------------------------------------- 1 | Challenge 5 in Python3 by Steven Landau 2 | -------------------------------------------------------------------------------- /challenge_5/python/slansford/README.md: -------------------------------------------------------------------------------- 1 | This program takes two strings and returns the extra letter that is present in string two but not string 1. 2 | Uses Python 3.6.0 -------------------------------------------------------------------------------- /challenge_5/python/system123/FindTheDifference.py: -------------------------------------------------------------------------------- 1 | class Solution: 2 | def findTheDifference(self, s, t): 3 | v = list(s) 4 | 5 | for c in t: 6 | if c not in v: 7 | return(c) 8 | 9 | return(None) -------------------------------------------------------------------------------- /challenge_5/python/tvanderwal/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 5:Find the Difference 2 | - Find the added character between two strings 3 | - String two is string one randomized with an added char 4 | 5 | ## USE 6 | - Output returns only the added character (or first one) 7 | - Testing with mjuiuc's unittest 8 | 9 | ## NOTE: 10 | - Done with python 3.5 -------------------------------------------------------------------------------- /challenge_5/python/wost/.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | *.py~ 3 | -------------------------------------------------------------------------------- /challenge_5/python/wost/FindTheDifference.py: -------------------------------------------------------------------------------- 1 | class Solution(object): 2 | def findTheDifference(self, s, t): 3 | s, t = list(s), list(t) 4 | return list(set(t)-set(s))[0] if set(t)-set(s) != set() else None 5 | -------------------------------------------------------------------------------- /challenge_5/ruby/selectivealso/find_new.rb: -------------------------------------------------------------------------------- 1 | require "./methods.rb" 2 | 3 | s = "abcd" 4 | t = "abcde" 5 | 6 | complete_string = UniqueFinder.new(s, t) 7 | 8 | puts complete_string.find_unique 9 | -------------------------------------------------------------------------------- /challenge_5/ruby/selectivealso/readme.md: -------------------------------------------------------------------------------- 1 | ## Find the unique character 2 | require our methods file. It contains our main function, which is the same as in challenge 2. 3 | concatenate our string, and split them into a single array. Then use our `find_unique` method to find and return the unique character. -------------------------------------------------------------------------------- /challenge_5/rust/deg4uss3r/challenge_5/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "challenge_5" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_5/rust/deg4uss3r/challenge_5/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "challenge_5" 3 | version = "0.1.0" 4 | authors = ["deg4uss3r "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_5/rust/deg4uss3r/challenge_5/src/lib.rs: -------------------------------------------------------------------------------- 1 | 2 | 3 | pub fn find_odd_letter(s: &str, t: &str) -> Option{ 4 | 5 | for i in t.chars() { 6 | if s.contains(&i.to_string()){ 7 | continue; 8 | } 9 | else { 10 | return Some(i); 11 | } 12 | } 13 | 14 | 15 | None 16 | } 17 | -------------------------------------------------------------------------------- /challenge_5/rust/deg4uss3r/challenge_5/tests/testfiles/o1: -------------------------------------------------------------------------------- 1 | e 2 | -------------------------------------------------------------------------------- /challenge_5/rust/deg4uss3r/challenge_5/tests/testfiles/o2: -------------------------------------------------------------------------------- 1 | t 2 | -------------------------------------------------------------------------------- /challenge_5/rust/deg4uss3r/challenge_5/tests/testfiles/o3: -------------------------------------------------------------------------------- 1 | p 2 | -------------------------------------------------------------------------------- /challenge_5/rust/deg4uss3r/challenge_5/tests/testfiles/t1: -------------------------------------------------------------------------------- 1 | abcd 2 | abcde 3 | -------------------------------------------------------------------------------- /challenge_5/rust/deg4uss3r/challenge_5/tests/testfiles/t2: -------------------------------------------------------------------------------- 1 | alskdjfhg 2 | laksjdhfgt 3 | -------------------------------------------------------------------------------- /challenge_5/scala/ndsmith3/FindTheDifference.scala: -------------------------------------------------------------------------------- 1 | object FindTheDifference { 2 | def differentChar(original: String, mod: String): Char = 3 | mod.filterNot(x => original.contains(x)).head 4 | } 5 | 6 | object FindTheDifferenceApp extends App { 7 | println(FindTheDifference.differentChar("abcd", "abcde")) 8 | } 9 | -------------------------------------------------------------------------------- /challenge_5/testfiles/o1: -------------------------------------------------------------------------------- 1 | e 2 | -------------------------------------------------------------------------------- /challenge_5/testfiles/o2: -------------------------------------------------------------------------------- 1 | t 2 | -------------------------------------------------------------------------------- /challenge_5/testfiles/o3: -------------------------------------------------------------------------------- 1 | p 2 | -------------------------------------------------------------------------------- /challenge_5/testfiles/t1: -------------------------------------------------------------------------------- 1 | abcd 2 | abcde 3 | -------------------------------------------------------------------------------- /challenge_5/testfiles/t2: -------------------------------------------------------------------------------- 1 | alskdjfhg 2 | laksjdhfgt 3 | -------------------------------------------------------------------------------- /challenge_6/cpp/manuel/src/include/ranges.h: -------------------------------------------------------------------------------- 1 | #ifndef RANGES_H 2 | #define RANGES_H 3 | 4 | namespace ranges { 5 | 6 | std::string represent_range (int, int); 7 | std::vector get_ranges (std::vector); 8 | 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /challenge_6/cpp/manuel/src/include/tools.h: -------------------------------------------------------------------------------- 1 | #ifndef TOOLS_H 2 | #define TOOLS_H 3 | 4 | namespace tools { 5 | std::vector string_to_numbers (std::string); 6 | } 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /challenge_6/java/zmiller91/README.md: -------------------------------------------------------------------------------- 1 | # Ranges 2 | 3 | Iterate through the array keeping track of the last element. If the last element is not 1 less than the current element then a range as ended. Repeat this process until the end. -------------------------------------------------------------------------------- /challenge_6/postscript/moonpatroller/README.md: -------------------------------------------------------------------------------- 1 | The solution processes elements in the input array, converting it to 2 | an array of start-end pairs by throwing out numbers between start and end. 3 | The array of start-end pairs is then converted to the final array of strings. 4 | 5 | -------------------------------------------------------------------------------- /challenge_6/python/CindyB/src/solution.py: -------------------------------------------------------------------------------- 1 | def ranges(values): 2 | found_ranges = [] 3 | first_number = values[0] 4 | 5 | for index in range(1,len(values)): 6 | if (values[index] - 1 != values[index-1] and first_number != values[index-1]): 7 | found_ranges.append(str(first_number) + "->" + str(values[index-1])) 8 | first_number = values[index] 9 | 10 | return found_ranges -------------------------------------------------------------------------------- /challenge_6/python/mindm/README.md: -------------------------------------------------------------------------------- 1 | # Challenge_6 2 | ## Ranges 3 | This method will find the ranges of your input list! 4 | 5 | You can run tests with: 6 | ``` 7 | $ python3 test.py 8 | ``` 9 | -------------------------------------------------------------------------------- /challenge_6/rust/deg4uss3r/challenge_6/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "challenge_6" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_6/rust/deg4uss3r/challenge_6/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "challenge_6" 3 | version = "0.1.0" 4 | authors = ["deg4uss3r "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_6/scala/ndsmith3/README.md: -------------------------------------------------------------------------------- 1 | Ranges 2 | --- 3 | Scans through the array, looking for continuous ranges. When it encounters a range, it reduces it into a 'start->end' string. It then creates a copy of the array without the range that has been made. It then recursively calls ranges on that array, making a list of range strings. 4 | -------------------------------------------------------------------------------- /challenge_6/testfiles/o1: -------------------------------------------------------------------------------- 1 | 1->5 2 | 8->10 3 | -------------------------------------------------------------------------------- /challenge_6/testfiles/o2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YearOfProgramming/2017Challenges/a8f556f1d5b43c099a0394384c8bc2d826f9d287/challenge_6/testfiles/o2 -------------------------------------------------------------------------------- /challenge_6/testfiles/o3: -------------------------------------------------------------------------------- 1 | 1->2 2 | -------------------------------------------------------------------------------- /challenge_6/testfiles/o4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YearOfProgramming/2017Challenges/a8f556f1d5b43c099a0394384c8bc2d826f9d287/challenge_6/testfiles/o4 -------------------------------------------------------------------------------- /challenge_6/testfiles/o5: -------------------------------------------------------------------------------- 1 | -5->-3 2 | 4->9 3 | 600->602 4 | 10001->10003 5 | -------------------------------------------------------------------------------- /challenge_6/testfiles/t1: -------------------------------------------------------------------------------- 1 | 1,2,3,4,5,8,9,10 2 | -------------------------------------------------------------------------------- /challenge_6/testfiles/t2: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /challenge_6/testfiles/t3: -------------------------------------------------------------------------------- 1 | 1,2 2 | -------------------------------------------------------------------------------- /challenge_6/testfiles/t4: -------------------------------------------------------------------------------- 1 | -2,0,2 2 | -------------------------------------------------------------------------------- /challenge_6/testfiles/t5: -------------------------------------------------------------------------------- 1 | -5,-4,-3,-1,2,4,5,6,7,8,9,600,601,602,10001,10002,10003 2 | -------------------------------------------------------------------------------- /challenge_7/c/karanchawla/README.md: -------------------------------------------------------------------------------- 1 | The solution includes the first two test cases included in the example. -------------------------------------------------------------------------------- /challenge_7/cpp/manuel/src/include/tools.h: -------------------------------------------------------------------------------- 1 | #ifndef TOOLS_H 2 | #define TOOLS_H 3 | 4 | namespace tools { 5 | 6 | std::vector string_to_numbers (std::string); 7 | int sum_of_n(int); 8 | 9 | 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /challenge_7/find_missing_num.py: -------------------------------------------------------------------------------- 1 | import sys 2 | my_list=sys.argv[1] 3 | 4 | for x in range(0,len(my_list)+1): 5 | if x not in my_list: 6 | print(x) 7 | -------------------------------------------------------------------------------- /challenge_7/haskell/halogenandtoast/src/Challenge.hs: -------------------------------------------------------------------------------- 1 | module Challenge where 2 | 3 | missingNumber :: [Int] -> Int 4 | missingNumber xs = triangleNumber (length xs) - sum xs 5 | where 6 | triangleNumber x = (x * (x + 1)) `div` 2 7 | -------------------------------------------------------------------------------- /challenge_7/java/zmiller91/README.md: -------------------------------------------------------------------------------- 1 | # Find The Missing Number 2 | 3 | The missing number is the sum of 0 to N minus the sum of the array. 4 | -------------------------------------------------------------------------------- /challenge_7/postscript/README.md: -------------------------------------------------------------------------------- 1 | Find The Missing Number 2 | ====== 3 | 4 | Premise 5 | ------ 6 | Given a list of N integers whose values will each be an integer in the range 7 | from 0 to N, your job is to find the missing number. 8 | -------------------------------------------------------------------------------- /challenge_7/python/CindyB/src/solution.py: -------------------------------------------------------------------------------- 1 | def findMissing(values): 2 | result = sum(range(1,len(values)+1)) 3 | for value in values: 4 | result -= value 5 | 6 | return result -------------------------------------------------------------------------------- /challenge_7/python/aemc/README.md: -------------------------------------------------------------------------------- 1 | Find Missing Number solution: 2 | 3 | The find_missing_number function takes in one paramater (a list in this case). The sum of the current list is subtracted from the complete list. That is, we subtract the list of n length from the list of n + 1 length to find the missing number. -------------------------------------------------------------------------------- /challenge_7/python/aemc/src/find_missing_number.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | 4 | def find_missing_number(nums): 5 | # Subtract the sum of nums of nth length from the sum of nums of nth + 1 length 6 | # nth + 1 is the list of numbers without a missing number 7 | return sum(xrange(len(nums)+1)) - sum(nums) 8 | 9 | 10 | if __name__ == '__main__': 11 | print(find_missing_number([5,4,7,1,8,2,6,0])) 12 | 13 | -------------------------------------------------------------------------------- /challenge_7/python/bryantpq/README.md: -------------------------------------------------------------------------------- 1 | Done in Python 3 2 | 1. Calculates the total sum if the list was complete 3 | 2. Subtract the total by each element in the list to get the outlier 4 | -------------------------------------------------------------------------------- /challenge_7/python/mindm/README.md: -------------------------------------------------------------------------------- 1 | # Challenge_7 2 | ## Missing Number 3 | This method will find the missing number in O(1) space and O(n) time! 4 | Input is an unordered list from 0..n with 1 value missing. 5 | 6 | You can run tests with: 7 | ``` 8 | $ python3 test.py 9 | ``` 10 | -------------------------------------------------------------------------------- /challenge_7/python/mjuiuc/README.md: -------------------------------------------------------------------------------- 1 | #Solution 2 | 3 | 4 | I think I got it figured out. All I had to do was take the sum of the length of the list and then the sum of all the numbers in the list, find the difference betweend those results, and then return the difference. The function meets runtime and space requirements. 5 | 6 | I included some test cases in my solution. 7 | 8 | -------------------------------------------------------------------------------- /challenge_7/python/mjuiuc/solution.py: -------------------------------------------------------------------------------- 1 | def solution(nums): 2 | n = len(nums) + 1 3 | sums = 0 4 | Summation = 0 5 | for i in nums: 6 | sums += i 7 | for i in xrange(0,n): 8 | Summation += i 9 | return Summation - sums 10 | -------------------------------------------------------------------------------- /challenge_7/python/ning/README.md: -------------------------------------------------------------------------------- 1 | # Challenge 7, Find The Missing Number 2 | 3 | 1. Find the sum of all integers in the list given, `input_list`. 4 | 2. Find the sum of all integers between the minimum and maximum (i.e. range) of integers in the list given, `input_list`. 5 | 3. Find the difference between the two sums to get the missing integer. 6 | -------------------------------------------------------------------------------- /challenge_7/python/ning/challenge_7.py: -------------------------------------------------------------------------------- 1 | def find_missing(input_list): 2 | input_sum = sum(input_list) 3 | range_sum = sum([i for i in range(min(input_list), max(input_list)+1)]) 4 | return range_sum - input_sum 5 | -------------------------------------------------------------------------------- /challenge_7/python/sarcodian/READ.me: -------------------------------------------------------------------------------- 1 | Assume we are giving a list of unorder consective ints. We have to find 2 | which int is missing. Since we know a single int is missing, we know 3 | that the original list must have a length of given list + 1. 4 | Therefore, we sum all elements of range( lenght_of_given_list + 1) and 5 | subtract the sum of all elements in the given list. -------------------------------------------------------------------------------- /challenge_7/python/sarcodian/src/challenge_7.py: -------------------------------------------------------------------------------- 1 | def missing_int(L): 2 | ''' 3 | Ask for a list and return the missing value 4 | ''' 5 | 6 | sum_n = 0 7 | sum_n_less_1 = 0 8 | 9 | for i in range(len(L)+1): 10 | sum_n += i 11 | 12 | sum_n_less_1 = sum(L) 13 | 14 | return sum_n - sum_n_less_1 15 | 16 | 17 | -------------------------------------------------------------------------------- /challenge_7/python/slansford/README.md: -------------------------------------------------------------------------------- 1 | Function missingNo in challenge_7.py takes one input, a list with numbers ranging from 0 - N with one missing number, and returns the missing number. 2 | 3 | Completes test in an average of 0.0083 seconds. 4 | 5 | Uses Python 3.6.0 -------------------------------------------------------------------------------- /challenge_7/python/slansford/src/challenge_7.py: -------------------------------------------------------------------------------- 1 | def missingNo(inputList): 2 | 3 | minInt = min(inputList) 4 | maxInt = max(inputList) 5 | 6 | if minInt != 0: 7 | return 0 8 | 9 | else: 10 | return sum(range(minInt,(maxInt + 1))) - sum(inputList) -------------------------------------------------------------------------------- /challenge_7/python/wost/find_missing_number.py: -------------------------------------------------------------------------------- 1 | def find_missing_number(c): 2 | b = max(c) 3 | d = min(c + [0]) if min(c) == 1 else min(c) 4 | v = set(range(d, b)) - set(c) 5 | return list(v)[0] if v != set() else None 6 | 7 | print(find_missing_number([1, 3, 2, 4])) 8 | print(find_missing_number([0, 2, 3, 4, 5])) 9 | print(find_missing_number([9, 7, 5, 8])) 10 | -------------------------------------------------------------------------------- /challenge_7/ruby/selectivealso/missing_num.rb: -------------------------------------------------------------------------------- 1 | ints = [0,1,2,5,4,3,7,8,9] 2 | missing = 0 3 | counter = 0 4 | 5 | ints.count.times do 6 | if !ints.include?(counter) 7 | missing = counter 8 | end 9 | counter = counter + 1 10 | end 11 | 12 | puts "The missing number is #{missing}" -------------------------------------------------------------------------------- /challenge_7/rust/josephpd3/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "josephpd3" 3 | version = "0.1.0" 4 | 5 | -------------------------------------------------------------------------------- /challenge_7/rust/josephpd3/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "josephpd3" 3 | version = "0.1.0" 4 | authors = ["Joseph P DeBartola III "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /challenge_7/rust/josephpd3/README.md: -------------------------------------------------------------------------------- 1 | # Finding the Missing Integer 2 | -------- 3 | 4 | Given a list of integers, sorted or not, containing `{0 -> N - 1} - {k}`, find given missing integer k. 5 | 6 | Function `get_missing_num` consumes a `Vec` and returns a `u32`. 7 | 8 | Tests with `cargo test`. 9 | -------------------------------------------------------------------------------- /challenge_7/rust/josephpd3/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub fn get_missing_num(v: Vec) -> u32 { 2 | let supposed_sum = (0..(v.len() + 1)).fold(0, |sum, x| sum + x); 3 | let actual_sum = v.into_iter().fold(0, |sum, x| sum + x); 4 | supposed_sum as u32 - actual_sum as u32 5 | } 6 | -------------------------------------------------------------------------------- /challenge_7/scala/ndsmith3/README.md: -------------------------------------------------------------------------------- 1 | Missing Number 2 | --- 3 | - Time: O(n) 4 | - Space: O(1) 5 | 6 | Finds the what the sum of an (0 to n) array should be, then subtracts the actual sum of the array argument. 7 | -------------------------------------------------------------------------------- /challenge_7/testfiles/o1: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /challenge_7/testfiles/o2: -------------------------------------------------------------------------------- 1 | 102 2 | -------------------------------------------------------------------------------- /challenge_7/testfiles/o3: -------------------------------------------------------------------------------- 1 | 339 2 | -------------------------------------------------------------------------------- /challenge_7/testfiles/o4: -------------------------------------------------------------------------------- 1 | 730 2 | -------------------------------------------------------------------------------- /challenge_7/testfiles/o5: -------------------------------------------------------------------------------- 1 | 445 2 | -------------------------------------------------------------------------------- /challenge_7/testfiles/t1: -------------------------------------------------------------------------------- 1 | 1,3,4,0 2 | -------------------------------------------------------------------------------- /challenge_8/ArbitLinked-List12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YearOfProgramming/2017Challenges/a8f556f1d5b43c099a0394384c8bc2d826f9d287/challenge_8/ArbitLinked-List12.gif -------------------------------------------------------------------------------- /challenge_8/c/karanchawla/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | Karan Chawla 3 | Challenge #8 4 | ``` 5 | 6 | ## Approach 7 | Okay so I took the easy way of just copying each node 8 | right after each node in the first list and copying the random node data to 9 | the new nodes. Once this is achieved, separate the two lists. (Phew finally no Seg faults) 10 | 11 | *Includes an example with 5 nodes.* 12 | -------------------------------------------------------------------------------- /challenge_8/linkedlist.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YearOfProgramming/2017Challenges/a8f556f1d5b43c099a0394384c8bc2d826f9d287/challenge_8/linkedlist.jpg -------------------------------------------------------------------------------- /challenge_8/python/mjuiuc/listNode.py: -------------------------------------------------------------------------------- 1 | class listNode: 2 | def __init__(self,val=None,next=None,random=None): 3 | self.val = val 4 | self.next = next 5 | self.random = random 6 | -------------------------------------------------------------------------------- /challenge_8/python/system123/README.md: -------------------------------------------------------------------------------- 1 | This could have been done better, having a seperate linked list class isn't really needed at all but made the most sense in my head at the time. However, I am pretty happy with the algorithm for cloning the list, it runs in o(n) time and it does the cloning in place in 3 passes. 2 | 3 | I'm still learning Python so my code is probably not very Pythonesque -------------------------------------------------------------------------------- /challenge_9/C/karanchawla/src/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | Karan Chawla 3 | Challenge #9 4 | ``` 5 | 6 | I feel like I cheated in this challenge as instead of getting down to the crux of the problem 7 | I just implemented **Counting Sort** as it works in O(n) and there's no bar on the maximum space 8 | that can be used. 9 | 10 | To do: 11 | - [x] Implement O(n) solution. 12 | - [ ] Man up and think about a better solution. 13 | -------------------------------------------------------------------------------- /challenge_9/cpp/manuel/src/include/tools.h: -------------------------------------------------------------------------------- 1 | #ifndef TOOLS_H 2 | #define TOOLS_H 3 | 4 | namespace tools { 5 | 6 | std::vector string_to_numbers(std::string); 7 | std::vector sort_squares(std::vector); 8 | } 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /challenge_9/python/mjuiuc/solution_template.py: -------------------------------------------------------------------------------- 1 | def solution(nums): 2 | ''' 3 | type nums == list() 4 | ''' 5 | -------------------------------------------------------------------------------- /challenge_9/python/shaowen/readme.md: -------------------------------------------------------------------------------- 1 | Running example: 2 | 3 | arr = [-2,-1,0,1,2] 4 | 5 | square_sort(arr) 6 | 7 | 8 | output: 9 | [0,1,1,4,4] 10 | 11 | Testing 12 | 13 | Run unit_test.py directly. 14 | 15 | -------------------------------------------------------------------------------- /challenge_9/ruby/selectivealso/squared_array.rb: -------------------------------------------------------------------------------- 1 | require 'benchmark' 2 | 3 | puts Benchmark.measure { 4 | 5 | nums = Array.new(10000) {rand(-1000...1000)} 6 | 7 | class Array 8 | def square 9 | map! {|num| num ** 2} 10 | sort 11 | end 12 | end 13 | 14 | puts nums.square 15 | 16 | } 17 | -------------------------------------------------------------------------------- /challenge_9/rust/josephpd3/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "josephpd3" 3 | version = "0.1.0" 4 | authors = ["Joseph P DeBartola III "] 5 | 6 | [dependencies] 7 | itertools = "*" 8 | -------------------------------------------------------------------------------- /challenge_9/rust/josephpd3/README.md: -------------------------------------------------------------------------------- 1 | # Getting the Sorted Squares 2 | -------- 3 | 4 | Given an ordered list of integers, contiguous or not and possibly containing negatives, return a sorted list of all squares of these integers in increasing order. 5 | 6 | The function `get_sorted_squares` consumes a `Vec` and returns a `Vec`. 7 | 8 | Test with `cargo test`, as per usual. 9 | --------------------------------------------------------------------------------