Skip to content
Ravnary
A Knowledge Platform
Categories
Learn
Cheatsheets
Paths
Favourites
Review
Community
Colour theme
Light
Dark
System
Learn
Data Structures
Sequences and Lookup
Arrays and Strings
Quiz
Q 01
/ 04
Intermediate
Question 1 of 4. 0 correct, 0 incorrect.
Strings cannot be changed in place in Python, Java or TypeScript. Which way of building one long string from n pieces keeps the total work linear in its length on every implementation?
Add each piece with += rather than +
Reverse the pieces first, then add them with +
Collect the pieces in a list or a builder, then join them once at the end
Add each piece to the growing string with +
Check answer
Home
Learn
Paths
Saved
Community