How can I get my bubbleSort to only print final result without printing after each iteration? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can I get my bubbleSort to only print final result without printing after each iteration?

Example 9 8 7 6 only prints "BubbleSort: 6 7 8 9" as the only result after all iterations are done. https://code.sololearn.com/cyXN2S7817n0/?ref=app

21st Jun 2018, 7:28 AM
LottoMan
2 Answers
+ 1
your code seems to produce a MLE error, you should check that
21st Jun 2018, 12:25 PM
hinanawi
hinanawi - avatar
+ 1
William Wilson MLE - memory limit exceeded. it happens on SL if your code uses up more memory than the compiler allows (usually around 64mb), but i tried your code again now and it works just fine. must've been a hiccup on SL's side of things
21st Jun 2018, 3:44 PM
hinanawi
hinanawi - avatar