Practice
Code complexity challenges
Read the snippet, then predict both its time and its auxiliary space before you reveal the answer. Snippets are shown in Python, JavaScript, and Java. Costs can differ between languages, and the explanation says when they do.