Memory Exceeded Error | Sololearn: Learn to code for FREE!


Memory Exceeded Error

why do I keep getting the memory exceeded error when I input a number greater than 22 in this code

8/26/2017 4:18:48 PM

David Akhihiero

5 Answers

New Answer


hmm will try wit stringbuilders


tried stringbuilders it didnt work


you have a limited memory, time on sololearn if your program goes above that you get the error memory exceeded, time limit exceeded.


it's just that similar codes lyk mine run smoothly where mine fail


Try using StringBuilder instead of Strings. The concatenation is likely what's causing the high memory usage. Or try improving the algorithm! 😜 For example, You probably don't need Strings for converting to Oct or Bin