All letters in the input data must be distinct. Your case has 2 Gs On 18 Apr 2017 2:39 p.m., "varun vats" <[email protected]> wrote:
> > In Question : Alphabet Cake, > The greedy Large approach: > > There is a simple non-recursive approach as well. First, within each row, > we can extend each existing letter into all cells to the right of that > letter, until we reach another existing letter or the edge of the cake. > Then, we can extend the leftmost existing letter (if any) into all cells to > the left of that letter. > > Would give wrong answer for the below test case. > > > Test Case: > 1 > 2 4 > G ? ? K > ? G R ? > > According to the mentioned greedy approach : > > G G G K > G G R R > > Here the G is not rectangular. > > Correct answer could have been : > > G G K K > G G R R > > > Please team let me know if I am missing something. > > -- > 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/98239779-d1dd-42b1-8bf0-c4151e135527%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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/CAECKw-Oinie4o9M71Npvw04DKTjpA8m8wS1NNoWg-carL0ni9g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
