Hello, needed help kung bakit matagal mag output ang initial config sa 15 puzzle problem. I used A* algorithm at yung other initial configuration naman ay gumagana. Ano po kaya problem? Initial config na ang tagal mag output, 13 8 4 6 14 12 3 0 15 11 5 7 9 10 2 1. Working naman pag eto yung...
Di ko din po alam, but I'll clarify nalang po sa prof ko. This was the problem Act2 would be the Queue DS with peak() and change() functions and Act3 would be the Stack DS with peak() and change() functions.
Paano po ba i-implement ang change function sa Stack at Queue? Wala po akong mahanap na info about sa operation na change sa Queue at Stack. Salamat sa sasagot.
Ano po mali sa source code ko at hindi masort at maalis yung duplicate number? Ano po dapat baguhin, salamat in advanced.
#include<stdio.h>
#include<stdlib.h>
//structure of a node
struct node
{
int data; //data
struct node *next; //address
} *head;
void...
#include <stdio.h>
#include <string.h>
// Main Function
int main()
{
char S[200];
int i,length;
FILE *ifp;
ifp=fopen("input.txt","rt");
printf("The string read from the file is:\n");
fscanf(ifp,"%s\n",S);
printf("\t%s\n",S);
for (i = 0; S[i]...