Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

optimize the following code  RSS feed

 
Sandeep Bhandari
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Below given code prints the following output:

**
****
******
********





Can you help to remove those nested redundant while loops?? I guess they are causing bottleneck.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12529
48
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you tried? What worked? What didn't?

We're not really going to do it for you...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!