DSABeginnerReady

Arrays and Strings Assessment

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

Question 1multiple-choiceBeginner

8 pts

Array operation cost precision

Which statement is the most accurate production-grade description of array performance?

Question 2scenarioBeginner

14 pts

Array mutation cost under product constraints

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.

Question 3code-reviewBeginner

14 pts

Finding hidden array copies and repeated mutation cost

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.

Question 4scenarioBeginner

12 pts

String normalization and product semantics

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.

Question 5code-reviewBeginner

12 pts

String immutability and construction cost

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.

Question 6codingBeginner

16 pts

Frequency counter implementation

Write the core algorithm for checking whether two input strings contain the same letters after ignoring case, spaces, and punctuation. Include complexity and assumptions.

Question 7scenarioBeginner

12 pts

Choosing fixed arrays versus maps for counters

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?

Question 8multiple-choiceBeginner

12 pts

Assessment-grade explanation quality

Which answer best demonstrates SkillSkore-level reasoning for a string frequency problem?