Inspiration
MLH Beginner Challenge: Sorting a List
What it does
A simple list of strings that is organized alphabetically. I created a random list of creatures to test this on.
How we built it
I used Java and Replit. Using nested loops, I compared each string with each other and swap their positions when they meet a certain condition. In this case, when one string is smaller than the other (alphabetically)
Challenges we ran into
I first tried to do this in Python. However, I realized that I did not know much about Python For-Loops, so I decided to switch to Java to make sure that I actually know how to do this challenge. I plan to do this challenge again using Python, and then using a more complicated list.
Accomplishments that we're proud of
I was stuck on this for a whole hour until I realized that a single line of code was the reason that my code did not work for a while. I am proud of not quitting right then and there!
What we learned
I can solve simple problems!
What's next for Sorting List Practice
Using another language (Python) and sorting a more complicated List/Dictionary. Maybe using user input to create the list, rather than manually creating my own.
Built With
- java
- replit
Log in or sign up for Devpost to join the conversation.