Changes

Jump to: navigation, search

Algo holics

145 bytes added, 09:16, 8 March 2019
Sudoku Puzzle Solver by Gurpreet Singh
'''The call graph for the above execution looks like:'''
{| class="wikitable mw-collapsible mw-collapsed"
! Flat profile
|-
|
Call graph
[11] checkSquare(int, int, int) [19] __static_initialization_and_destruction_0(int, int) [10] placeNum(int, int)
|}
From the above Call graph we can see that the program took no time in finding the solution and the maximum number of calls were made to the checkRow, checkColumn and checkSquare function. However, to get a better understanding of the program let's try a harder Sudoku puzzle.
The Call graph for the following looks like:
 
{| class="wikitable mw-collapsible mw-collapsed"
! Flat profile
|-
|
Call graph
[6] checkSquare(int, int, int) [20] __static_initialization_and_destruction_0(int, int) [3] placeNum(int, int)
 
|}
From the above Call graph we can see that for a harder Sudoku puzzle, the time increased significantly. Moreover, it can also be seen that almost 50% of the time is consumed by the checkRow function, 18.8% by checkColumn and finally 12% by the checkSquare function. Thousand of calls were made to these 3 functions, if we parallelizing these functions then the efficiency of the program can be increased significantly.
85
edits

Navigation menu