id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

sspiege3@schools.nyc.gov arrayshift > moveMisbehavingStudent3
prev  |  next  |  chance

The order of "students" in a line is represented by an array of Strings. Position 0 represents the student at the beginning of the line. Unfortunately, the students near the front of the line are misbehaving, while the students near the end of the line are behaving well. Reverse the order of the array so that the misbehaving students are now at the end.


moveMisbehavingStudent3(["Moe", "Larry", "Curly"]) → ["Curly", "Larry", "Moe"]
moveMisbehavingStudent3(["Moe", "Larry"]) → ["Larry", "Moe"]
moveMisbehavingStudent3(["Moe"]) → ["Moe"]

...Save, Compile, Run (ctrl-enter)

public String[] moveMisbehavingStudent3(String[] students) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 250 Post-solution available

Copyright Nick Parlante 2017 - privacy