Problem · Hash Table
Find Maximum Number Drop Points Connected
Learn this problemProblem statement
Print an integer representing the number of coordinates in the best path which covers the maximum number of drop points by flying over the terrain once.
Note
A path is valid path if, more than one drop points are connected (Single coordinate don't create any path, so pilot cannot fly over it).
Constraints
1 < N, M ≤ 700 (where N is always equal to M).
Function
findMaximumNumberDropPointsConnected(x: int[], y: int[]) → intExamples
Example 1
x = [2, 3, 2, 4, 2]y = [2, 2, 6, 5, 8]return = 3There are 5 coordinates- (2,2), (3,2), (2,6), (4,5) and (2,8).
The best path is the horizontal one covering (2,2), (2,6) and (2,8).
So, the output is 3 :)
Constraints
1 < N, M ≤ 700 (where N is always equal to M).More Cisco problems
- Collect CoinsSeen Jun 2025
- FizzBuzz ProblemSeen May 2025
- Find Largest Sum Contiguous SubarraySeen May 2025
- Find Largest Sum of Continuous SequenceSeen May 2025
- Find Palindrome Sub-stringSeen May 2025
- Count Numbers with Digit SumSeen Mar 2025
- Maximum Chocolates from Jars (L.C. 198 :)Seen Mar 2025
- Find Elements Largest in Row Smallest in ColumnSeen Mar 2025