659 Topics

Member Avatar for
Member Avatar for jamesmadison43

The goal of the program is to make a sparse matrix using circularly linked lists. basically its a matix what only has values at the locations entered, and the rest of the lactions are not defined. the question i have is the logic for the code. how would i go …

Member Avatar for jalpesh_007
0
270
Member Avatar for ibthevivin

>Write a Java program that recursively reads ten names from a file, and then outputs the total number of characters in the names, the list of names, and the list of names in reverse order. All looping must be performed recursively. > Jay Walker Erol Flintstone C. Erol Madre Billy …

Member Avatar for Taywin
0
2K
Member Avatar for aparnesh

I am trying to create a drop down menu using UL and LI elements. Each LI is an image (of same size) and there are no Bullets in the List. In IE, the list Items are left-aligned as I want them. In Chrome the list Items are right aligned with …

Member Avatar for aparnesh
0
385
Member Avatar for Inshu

Can I append a list obtained from a Class as output outside the class , if Yes how ?? can i use userList for this purpose ?

Member Avatar for Schol-R-LEA
0
204
Member Avatar for testie

Im having some trouble putting together a linked list implementation of a queue. I'm getting a segmentation fault, which I believe is due to my empty() function because in an attempt to fix my empty() function, I made it determine empty based on (current_size == 0) instead of (front_p == …

Member Avatar for dx9_programmer
0
752
Member Avatar for FUTURECompEng

Currently this method has a run time of O(N^2) and I am trying to get it to O(N). Any suggestion as to where I should start? public void removeAll(e removeNum) { node nodeToFind = this.find(removeNum); while(nodeToFind != null) { this.remove(nodeToFind); nodeToFind = this.find(removeNum); } } Thanks

Member Avatar for JamesCherrill
0
296
Member Avatar for pattilupwned

Hello, I am writing a program that reads in data from a text file and puts it into a linked list. Certain variables are read in only if the "officeHeld" number is a particular number, otherwise the variable is set to 0. When I run this through Visual Studio, I …

Member Avatar for dx9_programmer
0
350
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 ownedbynothing

I do have 2 structures here. main linked list is the word. each node of the word list do have a meaning typedef struct node{ char word[20]; struct node2 *meaning; struct node *next; }word; typedef struct node2{ char meaning[100]; struct node2 *next; }means; My problem now is I can't add …

Member Avatar for Gonbe
0
1K
Member Avatar for compscihelp

Hi, I need to create a function using **recursion** to find out if two lists have the same shape. For example, if nest1 = [4, [ [3,6], [] ,7] ,[8] ] nest2 = [ [ [3] ] , 7 , [ [5 , [9 , 2] , [ [ [ …

Member Avatar for compscihelp
0
200
Member Avatar for bloominninja

So im having issues with a sorted list template, heres how I implemented it enum RelationType {LESS, EQUAL, GREATER}; template<class ItemType> struct NodeType { ItemType info; NodeType<ItemType>* next; }; template<class ItemType> class SortedType { public: SortedType(); ~SortedType(); bool IsFull() const; int GetLength() const; void MakeEmpty(); ItemType GetItem(ItemType item, bool& found); …

Member Avatar for bloominninja
0
335
Member Avatar for echocoder

I have a nested list, named env, created in the constructor and another method to populate an element of the grid defined as below: ... class Environment(object): def __init__(self,rowCount,columnCount): env = [[ None for i in range(columnCount)] for j in range(rowCount) ] return env def addElement(self, row, column): self[row][column] = …

Member Avatar for echocoder
0
1K
Member Avatar for DelilahDemented

I have a program that is supposed to match opening and closing braces. It's supposed to work like a stack. It works until the last line of the input file. The last line is matching, but because it thinks the array size is zero it drops out and states that …

Member Avatar for DelilahDemented
0
189
Member Avatar for SAM2012

I have a queue class code is given below: struct ListNode { ListNode(int value); int value; ListNode* next; }; ListNode::ListNode(int value): value(value), next(nullptr) {} public class queue { public: queue(); ~queue(); bool Empty() const; int Next() const; void Enqueue(int value); void Dequeue(); void DisplayAll() const; int getP() const; private: // …

Member Avatar for SAM2012
0
280
Member Avatar for superchica08

Combining queue and stack link list? hello so here is my question i ave to connect a link lists together, one who behaves like a stack the other like a queue.the numbers used are 11 22 44 77 33 99 66. so the stack link list looks like this 66 …

Member Avatar for Lerner
0
1K
Member Avatar for Brian_L

#include <iostream> using namespace std; class Lists{ public: void insert_head(int insert); void remove_head(); void insert_tail(int insert); void print(); Lists(); private: Node *head; Node *tail; }; struct Node{ int data; Node *link; }; int main() { Lists temp; temp.print(); return 0; system("PAUSE"); } Lists::Lists(){ head = new Node; head->Link=tail; tail->Link=NULL; } …

Member Avatar for JasonHippy
0
145
Member Avatar for anishxx323

How do i write a python code so that my list of numbers can be updated within an elif cause? I start off with an empty an empty list then from there i have to ask the user how many new scores they want to add to the list then …

Member Avatar for TrustyTony
0
261
Member Avatar for sandesh.ps.9

Hai friends,I was developing a code for linked list operations. But while doing deletion, if we give a position except 1, the particular node will be deleted. But if i give position as 1, the node will not be deleted. Please help. I'm posting the code below #include <iostream.h> #include …

Member Avatar for np complete
0
2K
Member Avatar for poskypozze

Hi friends! i'm currently work on a chatting system that requires me to list all the user friends, so i need a code that will help me navigate throw the freinds list one after the other. thanks!

Member Avatar for diafol
0
159
Member Avatar for smith32

Hi, I'm working on a quick sort for double linked list. All work except the first item. I don't know what is wrong. Can u plz help me find the error? Here is my code. dlist_t* quick_sort(dlist_t* list) { dlnode_t *tnode = NULL, *first = NULL, *last = NULL; first …

Member Avatar for smith32
0
244
Member Avatar for rhowell

I'm working with some old code and the users tell me that the original program's output was a single binary file containing multiple stuct data. The output I get is a binary file containing a single structure. The comment also indicates that this what is happening but I need to …

Member Avatar for poornamoksha
0
221
Member Avatar for M.S.

This is and answer to one of the Vegaseat's recent projects for beginners. I share my solution here because -as a begginer and do learn python as a hobby- I need your feedback. So please tell me am I doing it the right way? Thanks in advance for comments from …

Member Avatar for M.S.
0
295
Member Avatar for anisha.silva

so i have 4 list of words. what i want to do is for each list go through it and count the number of occurance the word has in the list and print the first 10. when it comes to saving the word and the number of occurance, how do …

Member Avatar for anisha.silva
0
229
Member Avatar for pynehalem

To All Pythonist.. I have small SQLITE db.. for User Table 'SELECT loginUser from User'; sql = cursor.fetchall() listSQL = sql[:] for x in listSQL: print x listSQL SELECT Data Produce: (u'user1',) (u'user2',) (u'user3',) I want to match the list of user with a string input: example if the value …

Member Avatar for woooee
0
321
Member Avatar for Dean_williams

Hello. I am having a tough time understanding the concept of double linked list. For now, i understand double linked list has 2 links, one forward and another one previous. data is in the middle. when inserting must check where to insert. if previous is equal to null, then can …

Member Avatar for Dean_williams
0
229
Member Avatar for arjuna_wahid

Hello there, I am new to C++. I have a task from school to make simple sorting program using Insertion Sort with a linked list. I would like to have comment, feedback, and correction of my code below. #include <iostream> using namespace std; struct Sort{ int value; Sort *next; // …

Member Avatar for rubberman
0
1K
Member Avatar for David2012

Hi Everyone! My question is on Pagination (as it is called). I have a php program that accesses a database and shows the result list with HTML. Well, if my result list is quite long how do i code so that only say 10 rows show per page. I know …

Member Avatar for urtrivedi
0
360
Member Avatar for deepthought

Hi All, I have a list of hex values that originated from a text string that was downloaded having now created a list of thes values approx 804 of them, when i run the list items through a loop to conert hex into dec had an error looking at this …

Member Avatar for deepthought
0
400
Member Avatar for tformed

Hi guys, I've got the program running, but not as how the instructor requested. The professor wants us to ask the user for a text file and classify the data accordingly. Example: E = Enter L = Leave So if I have a text file with the following info E …

Member Avatar for jalpesh_007
1
326
Member Avatar for Matth963

I want to do this: When I press on a checkbox 'Monday', the program displays the List 'lstMonday' When I press on a checkbox 'Tuesday', the program displays the List'lstTuesday' How can I achieve this? I've tried to do it ut can't:( Thanks in advance

Member Avatar for stultuske
0
112

The End.