Codey and Exit
https://www.hackerrank.com/contests/codenection-2024-final-round-closed-category/challenges/cn24-2/problem
Question
Codey is in its bedroom, standing at point on a 2D grid, and the door is located at some point . Codey has four possible moves:
Move up -> Moves from to
Move down -> Moves from to
Move left -> Moves from to
Move right -> Moves from to
Codey needs your help to find the minimum number of moves required to reach the exit.
Input Format
The first line contains two integers a and b, which represents the coordinate of Codey.
The second line contains two integers x and y, which represents the coordinate of the door.
Constraints
Output Format
Output the minimum number of moves required for Codey to reach from
Sample Inputs:
Last updated
