Zero Difference
CodeChefOpen on judge ↗
You have $n$ number $1,2,3,\dots,n$. You want to partition this number in in $2$ array such that both array have same sum of its element. size of new partitioned array can be any positive number less than $n$. for example if $n=3$ than you can partition $[1,2,3]$ in $[1,2]$ and $[3]$ and both have same sum. If $n=5$ than you can not partition $[1,2,3,4,5]$ in two array such that both have s
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start