Thread: Function for sudoku

  1. #1
    Registered User
    Join Date
    Sep 2022
    Posts
    5

    Function for sudoku

    I wish to solve a skyscrapers which is a type of sudoku. Currently I print a 4 x 4 grid and populate it with zeros although I do not know how to write a function that correctly fills in all of the numbers based on the constraints and rules of the puzzle.

    Code:
    int        solve_sudoku(int tab[4][4], int value)
    {
    
    }
            //populate(tab, 4);
            //solve_sudoku(tab, 4);
            //print_tab(tab, 4);

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Starting from a valid position and knowing the game rules would be a start.
    Skyscraper Sudoku Rules Explained + 5 Tips & Techniques – Mastering Sudoku
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sudoku
    By code_lover in forum C Programming
    Replies: 9
    Last Post: 09-16-2011, 11:19 AM
  2. Like Sudoku, but not.
    By quzah in forum Game Programming
    Replies: 4
    Last Post: 08-27-2011, 05:33 AM
  3. sudoku
    By ElemenT.usha in forum C++ Programming
    Replies: 22
    Last Post: 02-14-2011, 10:46 PM
  4. Sudoku
    By mrusnak in forum C Programming
    Replies: 10
    Last Post: 03-20-2009, 06:31 AM
  5. sudoku help
    By blue4life20 in forum C++ Programming
    Replies: 3
    Last Post: 11-18-2005, 03:50 PM

Tags for this Thread