Please Help Me In Number Spiral IDK WHAT TO DO
LINK: CSES - Number Spiral
PLEASE TELL ME THE APPROACH !!!
THANKS IN ADVANCE
KRISHNA WADHWANI
1 Like
Let me give you a basic idea , the square of even no. Occurs on first column like for 2 it is (2,1) and square of odd no. occur on first row like for 3 it is (3,1) , 1-based indexing is used . So now just find out the difference , give it a try , if u are unable to solve it then share the code you wrote .
1 Like
Basic maths , addition and subtraction
okay
1 Like