What is the problem ?

[Update]

Remember that we don't know what the program is supposed to do.Quote:I need Help to complete the code with Backtracking Algorithm to Count All the rectangles and squares which Determinants between the Entered points " * "

Give more details and show example.

Use

**Improve question**to update your question.

[Update]

In your example, I see only 2 squares, first is (1,1)&(1,2)&(1,3)&(2,1)&(2,2)&(2,3)&(3,1)&(3,2)&(3,3) and second is (2,5).

You need to tell us the rules for finding the rectangles and squares.

[Update]

After your last update,

As I understand the question, there is no need of backtracking method, the method don't fit the problem. The method to solve the problem is nested loops.Quote:the count beginning from the first nearest point to (1,1) to the End of the Table in Backtracking Method.

C++

// square size is (v1, h1) to (v2, h2) for(int v1 = 0; v1<size; ++v1) { // Upper for(int h1 = 0; h1<size; ++h1) { // Left if (table[v1][h1]== "*") {// Check if possible // set lower // set right // check if other points // filled conditions // print solution } } }

Since it smell like HomeWork, I let you complete the code.

As programmer,

**your job is to create algorithms**that solve specific problems and you can't rely on someone else to eternally do it for you, so there is a time where you will have to learn how to. And the sooner, the better.

Creating an algorithm is basically finding the maths and make necessary adaptation to fit your actual problem.

[Update]

Your comment was not readable. Please update your question with counting code and explain actual problem.

Use

**Improve question**to update your question.

**To downvoters: Comments don't work. posted comments just vanish.**

Where is the question?

Where are you stuck?

What help do you need?

Explain your problem.

Use

Improve questionto update your question.Use

Improve questionto update your question.