Problem Statement
Each element of movies contains the title of a movie followed by exactly one comma, followed by integers representing how much each person likes that movie. Each movie is formatted as "<Title>,<int>,<int>,...,<int>" Quotes, elipses, and angle brackets given for clarity only. The overall likability of a movie is defined as the sum of the integers representing how much each person likes the movie.
If multiple movies have the same maximum overall likeability, return the one that occurs first in the input.
Definition
- Class:
- Movies
- Method:
- mostLiked
- Parameters:
- String[], int
- Returns:
- String
- Method signature:
- String mostLiked(String[] movies, int people)
- (be sure your method is public)
Constraints
- Each integer in movies will be between -20 and 20, inclusive.
- people will be between 1 and 25, inclusive.
- The title of each movie will contain only letters ('a'-'z' and 'A'-'Z'), numbers ('0'-'9'), spaces (' '), and hyphens ('-').
- There will be exactly one integer for each person in each element of movies.
- There will be exactly one comma (and nothing else) between each integer, and between the movie title and the first integer.
- There will be between 1 and 20 elements in movies, inclusive.
Examples
{"Terminated,2,5,3,6", "Legally Blunt,5,1,3,6", "Robocopper,1,0,6,2", "Abs of Steel,1,12,6,1"}
4
Returns: "Abs of Steel"
Terminated has a total of 2+5+3+6 = 16 Legally Blunt has a total of 5+1+3+6 = 15 Robocopper has a total of 1+0+6+2 = 9 Abs of Steel has a total of 1+12+6+1 = 20 Since Abs of Steel has the highest total, the method returns "Abs of Steel".
{"Movie 1,-10,-9,-8,-7", "Movie 2,-6,-5,-4,-3", "Movie3,-2,-1,0,1"}
4
Returns: "Movie3"
{"a,-10,-10,-10,-9,5", "b,-10,5,-9,-10,-10", "c,0,1,2,3,4"}
5
Returns: "c"
{"zoidal,9,10,8,10", "zoidal returns,10,8,10,6", "zoidal strikes back,10,9,10,10", "attack of the zoidals,10,10,10,10"}
4
Returns: "attack of the zoidals"
{"dok the admin,4,5,6,7,8,9,10", "topcoder,10,-10,10,10,9,-8,7", "mike lydon,0,10,-10,0,7,6,10"}
7
Returns: "dok the admin"
{"A,-6,1,-3,1,-7,-6,4,2", "B,7,9,0,-3,7,-3,0,-2", "C,-7,3,-6,-6,-3,3,3,-8", "D,-5,-8,7,7,-2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-4,-1,-7,-7,-9", "K,-3,4,-4,4,6,3,9,5,-6,-1", "L,0,0,6,-7,-8,8,1,3,1,-7", "M,5,6,6,2,6,-7,-2,2,-8,-1", "N,9,1,-4,5,-1,0,8,-7,5,-2", "O,-7,9,-3,-6,2,-1,9,-6,-9,4", "P,-1,6,9,-6,-6,-5,0,2,-3,-3", "Q,3,1,-4,9,-7,-6,-5,-4,0,2", "R,3,2,-9,5,1,2,-2,-8,-4,2", "S,-7,-1,0,8,-4,5,-6,-9,9,-3", "T,5,5,7,-1,2,-1,1,0,3,-8"}
10
Returns: "E"
{"a,20,20,20,20,20,20,20,20,20,20,20,10", "b,0,0,0,0,0,0,0,0,0,0,0,0"}
12
Returns: "a"
{"a,-20,-20,-20,-20,-20,-20", "b,-20,-20,-20,-20,-20,-18"}
6
Returns: "b"
{"loser,-5,-5,-5"}
3
Returns: "loser"
{"b,-3,-4", "c,-6,-3", "d,-5,-1", "a,-5,-9"}
2
Returns: "d"
{"movie1,5,5,6", "movie2,5,5,5", "movie3,5,5,5", "movie4,6,5,5"}
3
Returns: "movie1"
{"A,-3,-2", "B,-1,-1", "C,-3,-2"}
2
Returns: "B"
{"A,-10", "B,-20", "C,-10"}
1
Returns: "A"
{"Terminated,-10,-20", "foofoo,-5,-10"}
2
Returns: "foofoo"
{"a,1,1,1"}
3
Returns: "a"
{"term,-20,-20,-20,-20,-20,-20"}
6
Returns: "term"
{"A,-3,-2", "B,-3,-2"}
2
Returns: "A"
{"Movie A,-10,-10", "Movie B,-5,-5"}
2
Returns: "Movie B"
{"Movie,-1,-1,-2"}
3
Returns: "Movie"
{"Movie A,-5,-5", "Movie B,-6,-7"}
2
Returns: "Movie A"
{"Movie A,1,5", "B movie,2,1", "movie 3,6,0", "last one,-1,7"}
2
Returns: "Movie A"
{"TT,-20,-10", "UU,-20,-20"}
2
Returns: "TT"
{"A,-20,-20,-20,-20,-20,-20,1", "B,-20,-20,-20,-20,-20,-5,-5"}
7
Returns: "B"
{"a,-1,-1,-1,-1", "b,-1,-1,-1,-1", "c,-1,-1,-1,-1", "d,-1,-1,-1,-1"}
4
Returns: "a"
{"Movie A,-11,-2", "B movie,-2,0"}
2
Returns: "B movie"
{"Terminated,-2,-5,-3,-6", "Robocopper,-1,0,-6,-2", "Legally Blunt,-5,-1,-3,-6", "Legally unt,-15,-1,-3,-6"}
4
Returns: "Robocopper"
{"q,-10,-10,-10", "w,-5,-5,-5", "e,-1,-1,-1"}
3
Returns: "e"
{"Movie A,6,3", "Movie B,-10,20"}
2
Returns: "Movie B"
{"MovieA,-5,-5", "MovieB,-5,-5", "MovieC,-5,-5"}
2
Returns: "MovieA"
{"a,-6,-5,-4", "c,-1,-8,-4"}
3
Returns: "c"
{"a,-10,-10,-10", "b,-8,-8,-8", "c,-9,-9,-9", "d,-11,-11,-11"}
3
Returns: "b"
{"A,-10", "B,-20", "C,-10"}
1
Returns: "A"
{"a,-20,-20,-20", "b,-1,-1,-1"}
3
Returns: "b"
{"g,-5"}
1
Returns: "g"
{"Movie A,-1,-5", "B movie,-2,-1", "last one,-1,-7"}
2
Returns: "B movie"
{"test,-20", "this,-18"}
1
Returns: "this"
{"Movie A,-10,-10", "Movie B,-8,-8"}
2
Returns: "Movie B"
{"a,-20,-10", "b,-20,-20", "c,-5,-5"}
2
Returns: "c"
{"boing,-20,-20,-20"}
3
Returns: "boing"
{"a,-10", "b,-5", "c,-20", "d,-3", "e,-8"}
1
Returns: "d"
{"asd,20,-20,2,3", "sdfd,-1,-1,-1,-1"}
4
Returns: "asd"
{"a,0,0", "b,0,0", "c,0,0", "d,5,5", "e,0,0", "g,0,0"}
2
Returns: "d"
{"a,1,2,3", "b,1,2,3"}
3
Returns: "a"
{"Hello,-20,-10,-10", "GoodBye,-20,-5,-5", "middle,-20,-7,-7"}
3
Returns: "GoodBye"
{"q,-10,-10,-10", "w,-5,-5,-5", "r,-2,-2,-2"}
3
Returns: "r"
{"what,-12,-8", "who,-10,-15"}
2
Returns: "what"
{"woowo,-10,-15", "meme,-5,-10"}
2
Returns: "meme"
{"a,-1,-2", "b,0,-1"}
2
Returns: "b"
{"a,-10,-10", "b,-10,-10", "c,-1,-1"}
2
Returns: "c"
{"Terminated,2,5,3,6", "Abs of Steel,1,12,6,1"}
4
Returns: "Abs of Steel"
{"a,-3,-1,-7", "b,-6,-7,-2"}
3
Returns: "a"
{"Terminated,-2,-5,-3,-6", "Legally Blunt,-5,-1,-3,-6"}
4
Returns: "Legally Blunt"
{"am,-1,-15", "a2,-1,-1"}
2
Returns: "a2"
{"abcd,20,20,20,20,20", "blah,-1,-20,-3,-4,-5", "gork,1,-2,1,-20,-19"}
5
Returns: "abcd"
{"matrix,-10,-10,-10"}
3
Returns: "matrix"
{"Test,1,2,3", "Winner,2,3,4", "Loser,0,1,2"}
3
Returns: "Winner"
{"movie a,1,2,3", "movie b,0,0,1"}
3
Returns: "movie a"
{"A,-3,-2", "B,-3,-2"}
2
Returns: "A"
{"MovieA,-5,-5", "MovieB,-5,-5", "MovieC,-5,-5"}
2
Returns: "MovieA"
{"MA,-5,-5", "MB,-6,-6"}
2
Returns: "MA"
{"q,-10,-10,-10", "w,-5,-5,-5"}
3
Returns: "w"
{"A,-5", "B,-1"}
1
Returns: "B"
{"a,-1,-5", "b,-6,-7"}
2
Returns: "a"
{"Die Hard,3,4,1,13", "Ghostbusters,4,1,15,6", "Carmen,1,1,1,19"}
4
Returns: "Ghostbusters"
{"matrix,-10,-10,-10"}
3
Returns: "matrix"
{"Aaa,-1,-1", "Bbb,-2,-2"}
2
Returns: "Aaa"
{"blargh,-10,-10,-10"}
3
Returns: "blargh"
{"MovieA,-5,-5", "MovieB,-5,-5", "MovieC,-5,-5"}
2
Returns: "MovieA"
{"Movie,-1,-1,-2"}
3
Returns: "Movie"
{"waka,-10,-14", "rama,-5,-10"}
2
Returns: "rama"
{"boing,-20,-20,-20"}
3
Returns: "boing"
{"ab,5", "ac,6", "ad,6"}
1
Returns: "ac"
{"a,-2"}
1
Returns: "a"
{"A,-3,-2", "B,-3,-2"}
2
Returns: "A"
{"what,-20,-15", "who,-12,-8"}
2
Returns: "who"
{"a,-10,-10", "b,-20,-20", "c,-5,-5"}
2
Returns: "c"
{"a,-1,-15", "b,-2,-15", "c,-1,-1", "d,-1,-1"}
2
Returns: "c"
{"what,-12,-8", "who,-13,-10"}
2
Returns: "what"
{"A,1,1", "B,3,3", "C,2,2"}
2
Returns: "B"
{"A,-20", "B,-10", "C,-10"}
1
Returns: "B"
{"a,-4,-5,-6", "b,-5,-4,-2", "c,-8,-1,-1", "d,-1,0,-1"}
3
Returns: "d"
{"arnold,-15,-14,-7", "jo bob,-5,-5,-5"}
3
Returns: "jo bob"
{"q,-10,-10,-10", "w,-5,-5,-5", "r,-2,-2,-2"}
3
Returns: "r"
{"a,-5"}
1
Returns: "a"
{"MA,-5,-5", "MB,-6,-6"}
2
Returns: "MA"
{"movie,-10", "realmovie,-5"}
1
Returns: "realmovie"
{"Terminated,-1,-1,-1"}
3
Returns: "Terminated"
{"MovieA,-5,-5", "MovieB,-5,-5", "MovieC,-5,-5"}
2
Returns: "MovieA"
{"MovieA,-5,-5", "MovieB,-5,-5", "MovieC,-5,-5"}
2
Returns: "MovieA"
{"A,-20", "B,-10", "C,-10"}
1
Returns: "B"
{"a,-3,-4,-1", "b,-5,-3,-1"}
3
Returns: "a"
{"Hello Movies Hello,-15,-15,-15", "Hello This,-10,-10,-5"}
3
Returns: "Hello This"
{"one,-20,-10,-10", "two,-20,-5,-5", "three,-20,-7,-7"}
3
Returns: "two"
{"A,-5,-5", "B,-15,-5", "C,-15,-15"}
2
Returns: "A"
{"g,-5"}
1
Returns: "g"
{"abcd d,-20,-19,-1,-3,-20", "blahblah,-20,-19,-18,-17,-16", "yay,-1,-2,-1,-1,-1"}
5
Returns: "yay"
{"a,-8,-4", "b,-1,-1"}
2
Returns: "b"
{"A,10,10,10", "B,5,5,5", "C,2,2,2"}
3
Returns: "A"
{"A,-3,-2", "B,-3,-2"}
2
Returns: "A"
{"Terminate,0", "Moj,0", "total,0"}
1
Returns: "Terminate"
{"Movie A,1,5", "B movie,2,1", "movie 3,6,0", "last one,-1,7"}
2
Returns: "Movie A"
"Movie A", "movie 3", and "last one" all have overall likeability of 6, but "Movie A" occurs first, so the method returns "Movie A".
{"zoidal,9,10,8,10", "zoidal returns,10,8,10,6", "zoidal strikes back,10,9,10,10", "attack of the zoidals,10,10,10,10"}
4
Returns: UNKNOWN-OUTPUT10291821323
{"dok the admin,4,5,6,7,8,9,10", "topcoder,10,-10,10,10,9,-8,7", "mike lydon,0,10,-10,0,7,6,10"}
7
Returns: "dok the admin"