+ 21
🏆********CHALLENGE *********🏆 Create a recursive function that draws the following pattern.
Create a recursive function called star that accepts an odd integer that draws the following pattern. Example: when called as star(9). \ | / \ | / \ | / \|/ --------- /|\ / | \ / | \ / | \ The display above is not accurate. what you are looking at us a 9x9 square. Enjoy your recursion. Its been 24 Hours, so here is my solution. It is not the best. I am really impressed with all the submisions. https://code.sololearn.com/c36iwbByGB8n/?ref=app
18 ответов
+ 11
1st version===non recursive
2nd version===recursive(no input needed)
3rd version===one-liner recursive(no input needed)
https://code.sololearn.com/cjAi8SIVr2GR/?ref=app
https://code.sololearn.com/cn1WGKcp2W2e/?ref=app
https://code.sololearn.com/c8fS5vDDacgm/?ref=app
+ 34
here is my try ☺
https://code.sololearn.com/cfNbNcNPlafO/?ref=app
+ 11
Thanks for all the submisions. I have learned something from each of you. See my code in the question above.
Choosng a winner was difficult, so please accept my decision.
1. Sayan Chandra (Masterfull)
https://code.sololearn.com/c8fS5vDDacgm/?ref=app
2. Christian Stollberg. (made me think the most)
https://code.sololearn.com/cp7a0taVoOeu/?ref=app
3. Hiroki Masuda ( Only Ruby entry and nifty execution)
https://code.sololearn.com/chEXGPoBl10J/?ref=app
4. Edgars Urbans ( Only Cpp recursion)
https://code.sololearn.com/c16C8IMWa9We/?ref=app
5. Gordie (Java)
https://code.sololearn.com/cHLAn50lbqtD
+ 10
@Sayan, you are the oneline master.
+ 7
bookmarking
+ 5
Recursive and parameterized, as requested:
https://code.sololearn.com/cp7a0taVoOeu/
+ 5
Mine in Python, but not recursive
https://code.sololearn.com/c25PjFuGMlpt/?ref=app
+ 5
Thanks for this great challenge.
Using recursive call with only one argument was difficult.
https://code.sololearn.com/chEXGPoBl10J/?ref=app
+ 3
Here's my try
https://code.sololearn.com/cnOQVB5AxEZ2/?ref=app
+ 3
Much appreciate for getting me through the concept of recursion!
And.. as always.. Thanks for the challenge!
https://code.sololearn.com/c16C8IMWa9We/?ref=app
+ 2
😀😀no brother just a newbie..my dear friend @Vcc deserves the crown..
i admire him very much...
+ 2
Just report this person 😤
+ 2
@Ahha
What are you even trying to get by doing this?
+ 2
+ 1
@ louis
i added 3 posts together...in my 1st post...
+ 1
Holy!!! No spam