subject

Write a function that accepts an 8 by 8 array of characters that represents a maze. Each position can contain either an X or a blank. Starting at position (0, 1), list any path through the maze to get to location (7, 7). Only horizontal and vertical moves are allowed. If no path exists, write a message indicating there is no path. Moves can be made only to locations that contain a blank. If an X is encountered, that path is blocked and another must be chosen. Use recursion.
2- Write a function which returns the sum of the digits of an integer value. You must use recursion. Example sum (765) = 18, sum (16978) = 31, etc.
3- Write a function which recursively reverses a string.
4- Tower of Hanoi: A very popular mathematical game or puzzle is referred to as the Tower of Hanoi. The idea behind the game s to find an efficient method for moving disks between three posts. Each disk has a different diameter, but all of them can be placed on the available posts. The goal of the game is to move all of the disks from one post to another according the following rules:
Only one disk may be transferred at a time
Only the top disk on any post may be accessed at a given time
No disk may be placed on top of a smaller disk at any point
At the start of the game, all of the disks must originally be placed such that the largest disk is on the bottom of the stack of one post, and the smallest is on the top of the stack on the same post. The disks should form a cone shape. Write a program to simulate the Tower of Hanoi game. For each move print the post number (1 – 3) from which the disk is taken, the diameter of the disk, and the resulting post on which the disk is placed. Also, show the current diameter of the disks on each post. You must use recursion to solve this problem! Initially start with three disks in your game. Note: if you visit http://towersofhanoi. info/Animate. aspx, you will find an animation of how Tower of Hanoi should run.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:30
My mom and i are moving and we don’t have wifi for the next week, i want to know if using a using a hotspot with unlimited data is better than using regular wifi. i’m considering cost, speed, and data sacrifices.
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
The isometric projection camera technique provides an illusion of perspective by using things like parallax scrolling to create the illusion of 3d in a 2d game
Answers: 3
question
Computers and Technology, 22.06.2019 18:30
All of the following are characteristics that must be contained in any knowledge representation scheme except
Answers: 3
question
Computers and Technology, 23.06.2019 06:30
How do you write an argumentative essay about the importance of free enterprise ?
Answers: 1
You know the right answer?
Write a function that accepts an 8 by 8 array of characters that represents a maze. Each position ca...
Questions
question
Mathematics, 28.09.2019 11:50
question
Computers and Technology, 28.09.2019 11:50
question
Mathematics, 28.09.2019 11:50
question
Business, 28.09.2019 11:50
Questions on the website: 13722361