Maximize The Cut Segments | Dynamic Programming | GFG POTD | C++ | Java | Code Kar Lo

Поділитися
Вставка
  • Опубліковано 12 вер 2024

КОМЕНТАРІ • 2

  • @HindiDubbedReels
    @HindiDubbedReels 28 днів тому +1

    Check ex: n=7, x=2,y=4,z=5
    Why can't we cut 7 3 times with x??
    Why the ans here is 2 , by using x and z ??
    Wrong problem

    • @code_kar_lo
      @code_kar_lo  28 днів тому

      If you cut n with x for 3 times then segment length will be 2,2,2,1. But it is mentioned that all segment length should be from x,y,z. Problem is not wrong you made a mistake in understanding it.