FastPrepMinimum Grid Moves
Problems/Minimum Grid Moves

Minimum Grid Moves

Atlassian logoAtlassian● MediumINTERNFULLTIMEOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in an Atlassian online assessment for interns and full-time roles. Our version follows the whole prompt as shown in the report.

In a zero-and-one maze, move from the top-left cell to the bottom-right. A move travels between 1 and k cells horizontally or vertically, but it cannot cross or land on an obstacle. Return the minimum number of moves, or -1 if the destination is unreachable.

Function

getMinimumMoves(maze: int[][], k: int) → int

Examples

Example 1

maze = [[0,0],[1,0]]k = 2return = 2
maze
01000110

Move right once and down once; the obstacle blocks the other route.

Constraints

  • 1 <= rows, columns, k <= 100
  • Cells contain only 0 or 1.

More Atlassian Online Assessment questions

  • Planning ProductionOA · Seen Feb 2025
  • K-Means ClusteringOA · Seen Feb 2025
  • Minimum Sorted Erasure OperationsOA · Seen Jun 2024
  • Count Analogous ArraysOA · Seen Mar 2024
  • Get Maximum ScoreOA · Seen Mar 2024
  • Better Compression 🦀OA · Seen Mar 2024
  • Romanizer 🐡OA · Seen Mar 2024
  • Flower Bouquets 💐OA · Seen Mar 2024
  • Binary Search Tree IteratorOA · Seen Nov 2023
  • Binary Tree Level Order TraversalOA · Seen Nov 2023

Similar questions at other companies

  • Minimize CommuteDatabricks · OA · PHONE SCREENDatabricks interview questions
  • Shortest Atom Action PathOpenAI · OAOpenAI interview questions
  • Minimum Cleaning Robot RunsHSBC · OAHSBC interview questions
  • Count Islands with DFS and BFSVisa · OAVisa interview questions
  • Number of IslandsGoldman Sachs · OA · PHONE SCREEN · ONSITE INTERVIEWGoldman Sachs interview questions
  • Count One Groups by SizeAgoda · OAAgoda interview questions
  • Ascend Vertical Wall (For off-campus 2025 batch hiring :)Uber · OAUber interview questions
  • Grid ExplorationIMC Trading · OAIMC Trading interview questions
  • Maximum Damage PatchGecko Robotics · OA · PHONE SCREEN
  • Nearest Different Maze Exit for a SnakeIntuit · OAIntuit interview questions

Atlassian interview experiences

  • Atlassian MLE Phone Screen: Model Deployment Design: 1 Experience
  • Atlassian Coding Screens and Karat: 3 Experiences (Part 2 of 2)
  • Atlassian Full Stack Interviews: 11 Experiences (Part 1 of 2)
All Atlassian interview questionsSee Atlassian hiring insights
Saved
class Solution {
    public int getMinimumMoves(int[][] maze, int k) {
      // Write your code here.
    }

}
Checking account…