If you have solved some sort of coding challenges online that have to do with lists, you know that you usually need to have access to indices and also elements in it.
You may also have to do that while you are working on your tasks.
When you create a new array in Java, you can set up the length of it. If you are programming mostly in Python these days, then you may not be aware that you can also do that in Python.
Let’s say that we have a fixed number of students and we want to save their heights in a list.
We can of course just declare an empty list and save their heights by appending new elements to the empty list.
Strings are pretty common in our day-to-day programming lives. One common task that we may need to do is perform a switch from one case to another one.
Of course, it’s not supposed to be a standalone task in Jira. Rather, it can be just a tiny portion of a larger task.
Since your time is valuable and you can invest it in more useful things, it is worth knowing that you can do such switches quickly in Python with built-in functions without having you do any implementation.
One of the first algorithms that we are usually taught is finding either the smallest or the largest element in a list of elements by iterating through every element in a list.
Let’s assume that we are trying to find the smallest element in a list.
The algorithm is quite straightforward and intuitive even for a 5-year-old: You assume that the first element is the smallest and save its value in a variable.
I am an experienced and passionate Senior Software Engineer with a demonstrated history of working in the full life cycle of software development with enormous curiosity for data science, machine learning, algorithms, data structures, and solving challenging problems. I am an open-source enthusiast at https://github.com/fatosmorina and also a writer.
I am open for new opportunities.