Close
Topic list
Morning Walk
MEDIUM
30 mins
Other topics
Problem solved
Skill meter
Strings
-
Matrices (2D Arrays)
-
Sorting
-
Binary Search
-
-
Stacks & Queues
-
Trees
-
Graph
-
Dynamic Programming
-
Greedy
-
Tries
-
Arrays
-
Binary Search Trees
-
Heap
-
Bit Manipulation
-

# Morning Walk

Contributed by
Arindam Majumder
Medium
Avg time to solve 30 mins
Success Rate 70 %
Share

## Problem Statement

#### You will output a string containing:

``````“Never” if they never meet.
“Point” if they meet at a point.
“Intersect” if they intersect each other.
``````

#### For Example:

``````For A = 1, B = 3, C = 5, D = 10
``````

``````They will never meet as their paths have no common points.
``````
Detailed explanation ( Input/output format, Notes, Constraints, Images )
##### Sample Input 1:
``````2
8 10 1 8
1 10 5 8
``````
##### Sample Output 1:
``````Point
Intersect
``````
##### Explanation For Sample Output 1:
``````For the first test case,
Alex will walk from 8 to 10 and Bob will walk from 1 to 8, and they both will meet at 8.
So, the output will be Point.

For the second test case.
Alex will walk from 1 to 10 and Bob will walk from 5 to 8, so they will intersect each other as the paths have intersecting points.
So the output will be Intersect.
``````
##### Sample Input 2:
``````2
1 10 8 15
1 5 6 10
``````
##### Sample Output 2:
``````Intersect
Never
``````
Console