Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
For the examples, are the coordinates for the starting cells reversed?

Mitch

Aug 7, 2022

For the examples, are the coordinates for the starting cells reversed?

2

0

Comments
Comments
Design Gurus
Design Gurus3 years ago

For the first example:

-> starting cell = (1, 3)

This means 2nd row and 4rd column.

These are correct.

Did we understand your question right?

M
Minh Vu3 years ago

Aren't coordinates usually (x, y)?

Design Gurus
Design Gurus3 years ago

That's right, this is confusing.

We are dealing with 2D arrays here.

For example when we say arr[1][3], it means second row and 4th column.

M
Mike Xu3 years ago

matices usually go by (row, column) order

On this page

Problem Statement

Try it yourself