sort Subroutine

public pure subroutine sort(empty_cells, p, n)


Solver routines


Starting from position p, sort the list of empty cells by ascending number of allowed digits. We use a bubble sort algorithm

Arguments

Type IntentOptional Attributes Name
integer, intent(inout), dimension(1:81, 1:3) :: empty_cells
integer, intent(in) :: p

The sort starts at position p (included)

integer, intent(in) :: n

Number of empty cells in the list


Called by

proc~~sort~~CalledByGraph proc~sort sort proc~solve_puzzle solve_puzzle proc~solve_puzzle->proc~sort proc~cli_solver cli_solver proc~cli_solver->proc~solve_puzzle proc~create_puzzle create_puzzle proc~create_puzzle->proc~solve_puzzle

Variables

Type Visibility Attributes Name Initial
integer, public, dimension(1:3) :: col
integer, public :: i
logical, public :: none_swap