Skip to content

fix : corrected blank_row_from_bottom formula in Number-Sliding-Puzzle is_solvable - #1848

Closed
tmdeveloper007 wants to merge 1 commit into
steam-bell-92:mainfrom
tmdeveloper007:#1844
Closed

fix : corrected blank_row_from_bottom formula in Number-Sliding-Puzzle is_solvable#1848
tmdeveloper007 wants to merge 1 commit into
steam-bell-92:mainfrom
tmdeveloper007:#1844

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Summary of What Has Been Done

Corrected the blank_row_from_bottom calculation in games/Number-Sliding-Puzzle/Number-Sliding-Puzzle.py to use blank_row_from_top + 1 instead of 3 - blank_row_from_top, ensuring the row-from-bottom value correctly reflects 1=bottom, 2=middle, 3=top.

Changes Made

  • Changed blank_row_from_bottom = 3 - blank_row_from_top to blank_row_from_bottom = blank_row_from_top + 1
  • Updated the inline comment to correctly reflect the semantic: 1=bottom, 2=middle, 3=top

Impact it Made

  • Ensures the solvability check uses semantically correct row-from-bottom values
  • Aligns the variable name with its actual computed value

Closes #1844

Note: please assign this PR to the tmdeveloper007 account.

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

@tmdeveloper007 is attempting to deploy a commit to the Anuj's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix : invert blank_row_from_bottom calculation in Number-Sliding-Puzzle is_solvable

2 participants