CHAPTER 3
STRINGS AND ARRAYS
This chapter contains Java-based code samples that solve various tasks involving strings and arrays. The code samples in this chapter consist of the following sequence: examples that involve scalars and strings, followed by examples involving vectors (explained further at the end of this introduction), and then some examples involving 2D matrices. Note that the first half of Chapter 2 is relevant for the code samples in this chapter that involve recursion.
The first part of this chapter starts with a quick overview of the time complexity of algorithms, followed by various Java code samples, such as finding palindromes, reversing strings, and determining if the characters in a string unique.
The second part of this ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access