We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
LOL the code's too complicated. It's a simple problem so the code should be simple too. Elegance is important in programming. There's also a lot of repetition in your code. Repeated blocks of code should be made into a function. This is the "do not repeat yourself" principle. Have a look at how small my python code is:
Equal Stacks
You are viewing a single comment's thread. Return to all comments →
LOL the code's too complicated. It's a simple problem so the code should be simple too. Elegance is important in programming. There's also a lot of repetition in your code. Repeated blocks of code should be made into a function. This is the "do not repeat yourself" principle. Have a look at how small my python code is:
Edit: made the code a bit more elegant.