Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am taking C programming class. I was wondering if you can help me with this question. Sue, do Pseudo-Sudoku The Problem Sue is a

I am taking C programming class. I was wondering if you can help me with this question.

Sue, do Pseudo-Sudoku The Problem

Sue is a TA for an undergraduate intro mathematics class. In an effort to demonstrate that mathematical reasoning can be fun (and that it does not necessarily involve numbers), Sue has

invented the game Pseudo-SudokuThis game is identical to ordinary Sudoku with one exception: where Sudoku uses the digits 1 through 9, Pseudo-Sudoku uses A,B...I. She has assigned Pseudo -Sudoku puzzles to her tutorial section with extra practice, and wishes to have a program to validate solutions. Your program should read ( from a file )an integer n followed by n Pseudo - Sudoku boards; for each board, it should check that the solution is valid. If it is, it should output valid; otherwise, it should output invalid. A Pseudo-Sudoku board is input as nine lines of nine letters each,separated by whitespace. A board is valid if and only if, for every row, column, and each of nine 3x3 sub - boards, every letter appears exactly once.

Sample Input

2

// two boards follow

ABCDEFGHI

DEFGHIABC

GHIABCDEF

BCDEFGHIA

EFGHIABCD

HIABCDEFG

CDEFGHIAB

FGHIABCDE

IABCDEFGH

AAAAAAAAA

AAAAAAAAA

AAAAAAAAA

AAAAAAAAA

AAAAAAAAA

AAAAAAAAA

AAAAAAAAA

AAAAAAAAA

AAAAAAAAA

Sample Output

valid

invalid

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions

Question

What is the current days sales outstanding KPI value for 2020?

Answered: 1 week ago

Question

Is how things are said consistent with what is said?

Answered: 1 week ago

Question

Has the priority order been provided by someone else?

Answered: 1 week ago