Skip to content
free
K
1
2
practice
Home
Math
English
Science
Social Studies
Contact
Language
English
Español
Sign In
/
High School Electives
/
Computer Science
/
Arrays and Lists
Grade Level
Computer Science
HSCS.151 Arrays and Lists
0%
Skill Level
🔴 Hard
00:00
Progress to Next Level
25% to Medium
Easy
Medium
Hard
Mastery
100%
A playlist API exposes `move(oldIndex, newIndex)`. Which implementation detail is most important for correctness?
A
Check that both indexes are valid, then remove from the old position and insert at the new position while preserving order
B
Append a duplicate and ignore the old position
C
Treat indexes as values stored in the song records. This treats the most visible requirement as the main design priority
D
Sort the playlist before every move
Submit Answer