[Solved] What are the foundations to learn before learning path-finding algorithm like BFS, DFS etc? [closed]

I strongly recommend you watch freeCodeCamp – Graph Theory video, as a Computer Science student that video had a lot of information that were hard to get/understand in my college course, even though BFS and DFS aren’t that hard yet still important to know them along with other Graph Algorithms solved What are the foundations … Read more

[Solved] Cluster is not a type + cluster does not name a type error. Error for add(cluster *). Cant have cluster *?

In void add(cluster*), the name cluster resolves to the data member queue::cluser, not to the class name ::cluster. Avoid giving the same name to a type and to a variable. You are only confusing yourself. solved Cluster is not a type + cluster does not name a type error. Error for add(cluster *). Cant have … Read more

[Solved] How to sort structs from least to greatest in C?

fix like this #include <stdio.h> #include <stdlib.h> #include <string.h> #define BUFF_SIZE 32 #define STRUCT_SIZE 512 struct info { char name[BUFF_SIZE]; char stAddress[BUFF_SIZE]; char cityAndState[BUFF_SIZE]; char zip[BUFF_SIZE]; }; void selectionSort(struct info *ptrStruct[], int size);//! int main(void){ int count, size;//! char buffer[600]; struct info *ptrStruct[STRUCT_SIZE]; for (count = 0; count < STRUCT_SIZE; count++){ ptrStruct[count] = (struct info*) … Read more

[Solved] Using vectors in c++ [closed]

There are several things wrong with your program: vector<int> pies[p], racks[p]; Should be: vector<int> pies, racks; The reason is that the first definition declares an array of vector. That certainly can’t be right, unless you really want to declare an array of vectors. What you want to do is declare two vectors that start out … Read more

[Solved] Program to remove all the consecutive same letter from a given string [closed]

printf(“%s\n”,str2[k]); str2[k] is a char, but you tell printf it is a char* But this program still will not work properly – the first call to gets() will just read the carriage-return that is left in the input queue after reading the initial int value. And you never null-terminate str2. solved Program to remove all … Read more

[Solved] Making a void toBST function in C which takes 2 arguments : Tree* root and an array and adds all tree nodes to an array – order does not matter

Making a void toBST function in C which takes 2 arguments : Tree* root and an array and adds all tree nodes to an array – order does not matter solved Making a void toBST function in C which takes 2 arguments : Tree* root and an array and adds all tree nodes to an … Read more