5 Ways to Sort Wisely

Hey to everyone! I guess you all did sorting at least once. I also guess that everyone knows a sorting called "Bubble," cause it is the easiest and most popular. But when it comes to time and your memory, what will you do?

Imagine a situation. You have a mass that contains about 10^100 elements. Is it still good to use bubble sorting? Just imagine checking every element... and not once. It is not so difficult to count how many operations it is and how much time it takes.

Functions for Strings in Java

What Is a String?

Firstly, of course, we have to initialize our string. What is a string used for?

  • You want to look at your string as a line, not as a mass of symbols.
  • If you have a long text, you want to work with the words, not the letters.
  • If you have lots of information, you need functions that solve questions as quickly as possible.

Initializing a String

String line;