8 pts
Array operation cost precision
Which statement is the most accurate production-grade description of array performance?
This assessment verifies the Arrays and Strings module. Passing it contributes up to 8 points in the 7-14 score band.
Questions
8
Limit
60m
Pass
85%
Score
+8
8 pts
Which statement is the most accurate production-grade description of array performance?
14 pts
A notification UI stores notifications in an array and inserts each new notification at index 0 because newest items appear first. It works with 40 notifications, but after users accumulate 80,000 notifications, live updates cause visible UI jank. Explain the cost and propose a better design.
14 pts
Review this reducer: `return [event, ...events];`. It runs once for every event in a stream of 10,000 events. Explain the hidden cost, why it can degrade performance, and how you would change it.
12 pts
A login system treats `Santosh`, ` santosh `, and `SANTOSH` as the same username. The current implementation compares raw strings directly. Design the safer comparison approach and state what must still be preserved.
12 pts
A CSV export builds a large output by repeatedly doing `output = output + line + '\n'` inside a loop over 200,000 rows. Explain the risk and propose a safer pattern in Java, Python, or JavaScript.
16 pts
Write the core algorithm for checking whether two input strings contain the same letters after ignoring case, spaces, and punctuation. Include complexity and assumptions.
12 pts
You need to count characters for product tags. In one product, tags are guaranteed lowercase English letters. In another, tags may contain arbitrary user text from many languages. Which counter shape would you choose in each case and why?
12 pts
Which answer best demonstrates SkillSkore-level reasoning for a string frequency problem?