286 Topics

Member Avatar for
Member Avatar for AlexTrott

Hello, I'm hoping you guys can help. I have a double linked list, and i am trying to add a bubble sort to it,I am really new to java, I've been able to do a bubble sort with great easy whilst using binary trees, but now i'm using a double …

Member Avatar for JamesCherrill
0
383
Member Avatar for harsha_123

I'm new to c++. I was studying data structures and came to know Linked Lists Lately. We had a problem of finding an item stored inside a linked list and here's the code I wrote using Visual Studio to store and find an item. This code gives me a run …

Member Avatar for harsha_123
0
1K
Member Avatar for MugANDGlass

[CODE]void search() { char id[12]; node *p = head; system("cls"); { cout<<"Search ID: "; cin>>id; } while ((p!=NULL) && (strcmp(id,p->id)!=0)) { p = p->next; } if(p==NULL) { cout<<"No such ID in our list"<<endl; delete p; } else cout<<"We have this ID in our list"<<endl; } void remove() { char id[12]; …

Member Avatar for v3ga
0
155
Member Avatar for MugANDGlass

[CODE]void insert() { counter++; char id [12]; string title; string author; int year; char num_id[12]; borrow *newptr,*p,*q;//declare p = head; q = NULL; //counter++; newptr = new borrow;//declare cout<<"\nEnter your ID: "; cin>>newptr->id; cout<<"\nTitle of the book: "; cin>>newptr->title; getline (cin, newptr->title); cout<<"\nAuthor: "; cin>>newptr->author; getline (cin, newptr->author); cout<<"\nYear: "; …

Member Avatar for Lerner
0
154
Member Avatar for dgreene1210

I'm having problems with my code all over. I have to be able to open a command line argument( which i know how to do). create a linked list, and print it backwards. This is what i have but im stuck with errors that i don't know how to fix. …

Member Avatar for dgreene1210
0
188
Member Avatar for smallrubberfeet

Hello all, I'm having a bit of trouble logically figuring out what to do in this case for my cs150 class. I have to create a linked list from a while loop, but I can't figure out how to link the list successively at the end of each line so …

Member Avatar for Clinton Portis
0
2K
Member Avatar for beeho

Hi all, I'm having a problem here!! I've attended a lecture on Implementation of stacks in c++ using arrays and it wasn't really hard to understand, but now I'm supposed to know how to Implement a stack using linked list, that's the problem. help please?:confused:

Member Avatar for beeho
0
279
Member Avatar for methosmen

I'm new to programming and C++. I've managed to succesfully insert multiple nodes from front. Problem is that when printing it starts with the latest node and goes "backwards". I would like it to start with the first node and print forward. Therefore I would like to insert new nodes …

Member Avatar for methosmen
0
268
Member Avatar for Stazloz

Having issues creating table using chain hashing (linked nodes). The program compiles, but is crashing during execution. I admit I don't really know what I'm doing since I havent really used inked lists in forever. A lot of this code I do not expect to work right away, such as …

Member Avatar for Stazloz
0
803
Member Avatar for Santi1986
Member Avatar for N1GHTS
0
94
Member Avatar for mary786

The Question is : Three stacks can be used to sort a list of numbers. Assuming stack in holds the input list of numbers, stack out is to hold the output list after sorting the numbers and temp is used during the sorting process. The sorting algorithm follows. 1 set …

Member Avatar for NormR1
0
201
Member Avatar for pnoylover

[CODE]#include<iostream> #include<string> #include<conio.h> using namespace std; struct node{ int num,ages; string name,skills; struct node *link; }; typedef struct node *nodepointer; nodepointer add(nodepointer &head, int nu, int age); void str(nodepointer &head, string na, string ski); void DeleteFront(nodepointer &head); void display(nodepointer head); int main(){ nodepointer head = NULL; int c,nu,age; string na,ski; …

Member Avatar for raptr_dflo
0
200
Member Avatar for wnr78ta

I have a simple doubly linked list for a class I am in and I keep getting a seg fault on my last line of code, no matter what i make it. I can put a bunch of random couts and it will print them all then on the last …

Member Avatar for wnr78ta
0
715
Member Avatar for Rez11

I have this assignment to do. Its been about a year since I messed with c++ and I've been refreshing my brain on the subject. The assignment is this : Your assignment is to write a program for a computer dating service. Each client gives you his or her name, …

Member Avatar for jmichae3
0
197
Member Avatar for eRayven38

Hey Guys, I am really trying to get into List-Implementation. Everything I wrote works fine except the "delete Element at Position" funktion. With the iterative Implementation there is no problem, everything works, but I want to do a recursive Version. This is the Task: Invent an algorithm which becomes a …

Member Avatar for deepu.sri24
0
1K
Member Avatar for greenq

I am implementing Selection sort in doubly - linked list. I have to sort list by surnames by finding smallest element and inserting it into beginning of the list But there are some troubles when I run my program I have NIL exception in Sort Method in while loop. Help …

Member Avatar for Taywin
0
2K
Member Avatar for k_arjun

Hi, I am a newbie to coding. I am trying to implement a graph in the following format. User input: v1 v2 edge_cost 1 3 10 1 2 20 2 3 40 3 1 30 I am storing the graph as an adjacency list, so that the output should be …

Member Avatar for k_arjun
0
872
Member Avatar for Warhead88

Hi, Can anyone show me or point toward a link with a decent example of a hash table using linked list. Thank you ,

Member Avatar for Warhead88
0
329
Member Avatar for rutwvu

I am currently working on a project where we must read in a file and then print it back type justified. There must also be a specific number of characters per line based upon user Input with the extra characters being distributed spaces. I am reading in each character from …

Member Avatar for Ancient Dragon
0
179
Member Avatar for Braindead90

Hi, I am trying to work on creating a linked list of player in a game, but I have not written code in a while and have no idea what I am doing wrong, can you please help with suggestion of what I did wrong or idea of how can …

Member Avatar for jmichae3
0
187
Member Avatar for corby

i have this code for adding a node after the previous node, but valgrind is saying that there is a memory leak of 16 bytes, can someone please help me identify where the leak is? i think i didnt assign a null pointer somewhere but im not sure exactly where …

0
115
Member Avatar for jeevsmyd

I'm new to generic programming and I just cant figure out what is wrong in this . The program is supposed to make a linked list using class. I have used 2 classes so that a single object of class LL can be used to manipulate a linked list . …

Member Avatar for mike_2000_17
0
131
Member Avatar for TrustyTony

Here unsystematic play with linked list structure Object Oriented style. If you have performance critical code, please do not use this but use the superb faster than list [URL="http://pypi.python.org/pypi/blist/"]blist module[/URL] (including sorted versions of main data structures). As OO newbie (though with some 30 years of other programming), I wanted …

0
214
Member Avatar for julylee06

Ok, so I need some guidance. Am trying to implement a linked list in java. I can't get it. I have been on here - dreaminncode, wikipedia, and some other colleges sites - I still don't/can't get it. I did look at the previous threads on this but they didn't …

Member Avatar for julylee06
0
222
Member Avatar for Braindead90

I am working on creating a linked list to connect the previous value number (or string) to another value I asked this question before I am just guessing I did it completely wrong since no one responded. So what would be the best way to start the function. I need …

Member Avatar for sfuo
0
255
Member Avatar for PHkiDz

Hello good day to all... is there anyone can help or suggest me how my code work successfully. Actually the code was working well, but i wanted to change it`s content to GUI form. the program description was the user must input a word/String and shuffle/scramble the word that the …

Member Avatar for JamesCherrill
0
234
Member Avatar for anonadre

I'm having trouble with the 3rd if statement of my code if(select == 3). Here, if the user selects '3', then they should be able to search for students (given that students have already been inputted), via their ID. The ID that is searched and the subsequent Name relating to …

Member Avatar for anonadre
0
125
Member Avatar for PHkiDz

Here is my code so far and i`m editing it and adding some code, is there some one might tell me that this is the right way of coding list in permutation. This program is not yet complete. [CODE]package man; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; public class …

Member Avatar for NormR1
0
177
Member Avatar for PHkiDz

please help me in my code the error appears and i can`t figure it out. i used to write a program that will accepts the user input, but only a word then the program will scramble the word that had been inputted by the user and display it on JFrame(WINDOW) …

Member Avatar for peter_budo
0
185
Member Avatar for vishal1949

I made a program and want to enter previous dates into a linkedList. My code is [CODE]package bowlinggame; import java.util.Date; import java.util.LinkedList; import java.util.TreeSet; public class BowlingGame { public static void main(String[] args) { TreeSet <String>PlayerNames = new TreeSet<String>(); PlayerNames.add("Steve"); PlayerNames.add("James"); PlayerNames.add("Bob"); for (Object o : PlayerNames) { System.out.println(o); } …

Member Avatar for JamesCherrill
0
108

The End.