Skip to content

Staircase Search #376

Open
Open
@ShubhamGupta577

Description

@ShubhamGupta577

Description of the problem

  • Implement Staircase Search Algorithm.
  • Used to search an element from a row-wise and column-wise sorted 2-D array.
  • Time Complexity: O(max(n, m)), where n=number of rows, m= number of columns
  • Space Complexity: O(1)

Example of the Problem

Dimensions of the array: 5 5
Element to be searched: 20
1 4 8 10 45
2 5 9 15 55
6 16 18 20 12
7 14 21 27 11
11 17 19 23 19

Output:
20 found at (2,3)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions