see : https://code.google.com/codejam/contest/32003/dashboard#s=p3
HI,
I'm trying to practice my coding skills in java by working though the google
coding challenges.
I'm working on the Shopping Plan challenge but I'm stuck on how to take the
inputs.
My approach was to use a Hash-map that takes the items in as string which are
set as the keys to the hash-map. The keys each correspond to a array-list of
stops each containing a set of coordinates and a price. This works fine when
the is only a single item at one store for example:{ -392 -84 dd:179 } which
is input at the 'dd' key in the hash-map by adding the stop[-392,-84] and price
'179'...
but when I encounter {-653 565 dd:444 cd:96} I'm having difficulty creating a
while loop that checks if the is a second item to add to the hash-map at a
different key.
I've tried a
do{
//add the next price to key with the same coordinates//
}while(scanner.hasNext(":"));
but scanner.hasNext(":") is always returning false
Thanks for your help :)
--
You received this message because you are subscribed to the Google Groups
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-code/77c74cff-a4b5-4f93-b452-d39d4f8f30b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.