Hi, I think I can clarify your question. The operations they mentioned are that to appending the numbers to the existing number. If there is a number 1 and you can make it to 165 by adding to the existing number with 2 operations. Adding the 6 will cost an operation and adding the 5 will cost another operation that will make the number 165. I hope this email finds you well.
On Wed, Apr 14, 2021 at 5:51 PM James Prudd <[email protected]> wrote: > The officially analysis > <https://codingcompetitions.withgoogle.com/codejam/round/000000000043585d/00000000007549e5#analysis> > says > > "Therefore, the complexity of the overall algorithm is quadratic in the >> total number of digits in the input, and linear in the number of digits of >> the output. As an example, an input of N strictly decreasing integers of >> the same length yields an output where the i-th integer consists of exactly >> one more digit than the previous, which needs (N⋅(N−1))/2 operations in >> total." >> > > I am not understanding it (also what they mean by "operations" here). If > there are N numbers, I am still seeing the runtime to be linear in N, since > we just compare the i-th integer always with its previous one. > > -- > -- You received this message because you are subscribed to the Google > Groups Code Jam group. To post to this group, send email to > [email protected]. To unsubscribe from this group, send email > to [email protected]. For more options, visit this > group at https://groups.google.com/d/forum/google-code?hl=en > --- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/google-code/CA%2BkkWKsgJSnPsfkRoxyXu_DzyWbQpDQgd5N3MHP7V5SEAC0HSw%40mail.gmail.com > <https://groups.google.com/d/msgid/google-code/CA%2BkkWKsgJSnPsfkRoxyXu_DzyWbQpDQgd5N3MHP7V5SEAC0HSw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- -- You received this message because you are subscribed to the Google Groups Code Jam group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at https://groups.google.com/d/forum/google-code?hl=en --- 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 view this discussion on the web visit https://groups.google.com/d/msgid/google-code/CADsNCNmj2Z_u8FokN2HOJEu92SHwp_Za43T6zpBsK-qJGAPoYg%40mail.gmail.com.
