8 Topics

Member Avatar for
Member Avatar for ariel930

Hi,I am having a hard time trying to do insertion sort on a singly link list containing single alphabets.I have spent hours doing this but still it wont work.Any help will be apprecited. Here is my code: # include <iostream> using namespace std; class node { public: char info; node …

Member Avatar for richieking
0
5K
Member Avatar for woomar

Hi. I was wondering if someone could explain to me how to make some new node point to the first element in a list.

Member Avatar for somjit{}
0
228
Member Avatar for FUTURECompEng

I am trying to input an int into the end of a singly linked list. I have already created the code to put a number at the end of the list but when I go to print it out, it only prints out (in my test class) the int that …

Member Avatar for jalpesh_007
0
303
Member Avatar for eggsandbacon

Hey everyone, I'm working on an assignment and I'm having some trouble figuring out how to implement two operators. The program creates and implements a class to represent the Stack ADT using a singly-linked list. There is a driver program to test my implementation. I have everything implemented (except the …

Member Avatar for aranayd
1
1K
Member Avatar for cryonize

I have a bit a of a problem because I have no idea what's going on in my code. Could someone guide me with this? **It has to swap the nodes themselves. ** #include <iostream> #include <iomanip> using namespace std; typedef struct node { int DATA; node *NEXT; }; node …

Member Avatar for raptr_dflo
0
959
Member Avatar for Ayzu

I'm trying to implement priority queue using a singly linked list, but the program is not running in the best way, n the display function is showing just first n last node's data , y??? [CODE]#include<iostream.h> #include<conio.h> struct node { int n,p,b; // Data members for getting Task no. ,Priority …

Member Avatar for Ayzu
0
231
Member Avatar for fibbo

I just cant get my head around it. Is there another way going through a singly linked list without using some kind of helper function? The header file wants me to implement: [CODE]size_t priority_queue::size() { /* code here */ }[/CODE] Now I just could create a helper function that has …

Member Avatar for fibbo
0
356
Member Avatar for insanely_sane

Been working on this for 2 hours non stop. Can't seem to figure out exactly what's the problem. Perhaps I'm taking a wrong approach to this problem. Right, I need to copy a singly linked list to another new list. Can use any method EXCEPT RECURSION. Here's the code so …

Member Avatar for Taywin
0
3K

The End.