659 Topics

Member Avatar for
Member Avatar for brandon93s

I am writing a program in C to build linked lists from scratch. However, I am getting hung-up on trying to build a link list that will automatically sort itself. By this, I mean that the nodes will automatically be placed in the correct location. My current code is putting …

Member Avatar for histrungalot
0
582
Member Avatar for oldSoftDev

I am reading from a file and creating two lists, then sorting them after sorting I am trying to compare each elements number of occurances in a list but printing them with that number for example if a list is something like {1,2,3,3,3,5,5,5,6} then I want to print a report …

Member Avatar for TrustyTony
0
216
Member Avatar for pce369

I wrote a linked list program in C++ which compiles and works well. But I have been told that a) I have to have two separate structs instead of one that contains both the info and the node; and, b) that I have to use two pointers instead of the …

Member Avatar for Labdabeta
0
427
Member Avatar for cryonize

Can anybody tell me what's wrong with my selection sort of linked lists? It's meant to sort the whole node, not the data. #include <iostream> #include <iomanip> using namespace std; typedef struct node { int DATA; node *NEXT; }; node *HEAD = NULL; void Create(int data); void Display(); void Sort(); …

Member Avatar for Nick Evan
0
580
Member Avatar for cryonize

Hello again, I am asked by my professor to create a program using selection sort in a linked list. Selection sort with sorting only the data is pretty easy, but I'm having a hard time because he made us sort the nodes themselves. Can anyone help by giving atleast the …

Member Avatar for mike_2000_17
0
10K
Member Avatar for rayan90

i have a single list program which i need to sort the nodes of int and String type unsing only one of these algorithms (insertion, selection, bubble and shell). no merge or quick or using collections and stuff. i'm having a difficulty here, i only know how to implement them …

Member Avatar for zeroliken
0
253
Member Avatar for greatman05

Hello. What are some ways that one can work with (x,y) coordinate pairs in Python? I'm doing a homework assignment that requires me to create a program that can check for certain binary relations (reflexive, transitive, symmetric), and I'm having an issue coming up with the best approach for it. …

Member Avatar for greatman05
0
274
Member Avatar for cryonize

I was asked to create a program that enters numbers and displays the before sorting order, and the sorted order displaying the previous node address and the next node address. I was told not to swap the data inside the nodes, but move the nodes themselves. I have a problem …

Member Avatar for TrustyTony
0
9K
Member Avatar for pansquare

is there a way in python to only take from a file a string in between certain characters? for example, if i have this in a file: city state[long, lat]population how can i take from the line just what is in between the brackets (that is, come up with [long, …

Member Avatar for nbaztec
0
238
Member Avatar for White Eagle

How would I find all occurances of the letter 'e' for example in a list of the split word elephant? I've tried using letterlist.index('e') for example but index only returns the first occurance of e. This is to be used in a hangman game, and the game needs to display …

Member Avatar for woooee
0
183
Member Avatar for Sunciti

Hi - I'm a rookie programmer. Could somebody explain how I can append a nested list of the form: List = [[Name1,[Detail-1,Counter-1],[Detail-2,Counter-2].....] [Name2,[Detail-1,Counter-2],[Detail-2,Counter-2].....] ................................................. ] My code is : def program(List, Name, Detail): for entry in List: if entry[0] == Name: entry[1].append([Detail,Counter]) return [B][I] List.append ([Name,[Detail]]) for entry in index: …

Member Avatar for misokolsky
0
8K
Member Avatar for cr7489

hi i am trying to create 2 lists in one screen. i am using the google api places where i want the list to appear then when selected the result will appear, this what i have so far but the second list doesnt appear and i am not sure why …

0
96
Member Avatar for chopper25

So im stuck writing a function and was hoping someone would be nice enough to help. My objective is to look at a list of grades such as: [CODE][23 , 64 ,74 , 53 , 55[/CODE] And return a list with the number of grades in each percentage range I.E. …

Member Avatar for woooee
0
586
Member Avatar for TrustyTony

Sometimes, before optimizing your code, you may end up to have very slow running code in list comprehension statement. Because you have not yet tested the code fully, it easy to loose patience and just interrupt the code. If you are making function, you can insert print statements for verification. …

Member Avatar for Gribouillis
1
1K
Member Avatar for boiishuvo

I am trying to make a python that can remove any occurences of any word in stopwords from the wordlist, but I don't know what is exactly wrong with this program. Any suggestions? [code]STOPWORDS = ['a','able','about','across','after','all','almost','also','am','among', 'an','and','any','are','as','at','be','because','been','but','by','can', 'cannot','could','dear','did','do','does','either','else','ever','every', 'for','from','get','got','had','has','have','he','her','hers','him','his', 'how','however','i','if','in','into','is','it','its','just','least','let', 'like','likely','may','me','might','most','must','my','neither','no','nor', 'not','of','off','often','on','only','or','other','our','own','rather','said', 'say','says','she','should','since','so','some','than','that','the','their', 'them','then','there','these','they','this','tis','to','too','twas','us', 'wants','was','we','were','what','when','where','which','while','who', 'whom','why','will','with','would','yet','you','your'] def remove_stop_words(wordlist, stopwords=STOPWORDS): wordlist …

Member Avatar for HiHe
0
807
Member Avatar for abed1986

Hello everyone, I have a program that intends to create a doubly linked list of structures, using the following header (q1.h): [CODE=c]typedef struct lNode* ListNodePtr; typedef struct lNode { char* string; ListNodePtr next; ListNodePtr prev; } ListNode; [/CODE] This is my implementation: [CODE=c]#include "q1.h" #include <stdio.h> #include <stdlib.h> #include <string.h> …

Member Avatar for abed1986
0
803
Member Avatar for crazy99

Hello Sorry if this is confusing I'm really new to python and have been stuck trying to figure this out for hours now. I'm trying to write a function for a text based battlship game. I need the function to do this is_occupied: (int, int, int, int, list of list …

Member Avatar for crazy99
0
351
Member Avatar for cryonize

Hello! I have this problem with creating a linked list inside a linked list. Think of it as recording a list of customers, and at the same time, recording a list of items they bought individually. I tend to think that I might lose the head node and it's probably …

Member Avatar for Lerner
0
298
Member Avatar for leechang.kevin

Hi, I am building a room availability form that contains a foreign key 'roomNumber' that references the multiple dropdown list that contains the data time starting from 07:00 AM to 09:00 PM from monday to saturday, i can already store the data into the database but my problem now is …

Member Avatar for Biiim
0
788
Member Avatar for patrick1981

Hey fellows, I have three database tables AUCTIONS auction_id name description place date BIDDERS bidder_id firstname lastname email signupdate BIDS bid_id auction_id bidder_id biddate I want to create a drop down menu to select and display BIDDERS signed up for each AUCTIONS. I have coded the following in PHP to …

Member Avatar for karthik_ppts
0
6K
Member Avatar for SAM2012

Hi, I have used this [CODE]#using <System.dll> using namespace System; using namespace System::Collections::Generic; using namespace System::Linq; SortedList<double, String^>^ slist = gcnew SortedList<double, String^>();[/CODE] in one program its working well. But Now when I pasted the same code with all given headers in second program its not being identified there. Errors …

Member Avatar for SAM2012
0
813
Member Avatar for nyxxie

struct looks like this: [CODE] struct ListNode; typedef ListNode* ListType; struct details { char first_name[20]; char last_name[20]; int start_number; int end_number; }; struct ListNode { details data; ListType next; }; ListType list = NULL; ListType head = NULL; ListType * PointerToHead = &head; [/CODE] I have a circular linked list …

0
149
Member Avatar for muraj

Hi all. I could really use some help on adding a node to the end of a doubly linked list. First off here is my node class along with the class where the adding should take place. For simplicity I did not add the other parts and classes of the …

Member Avatar for NormR1
0
411
Member Avatar for BlackStar0703

Basically my app obtains data from a mysql server and displays it in a list view. What I want is for data from different columns (but the same row) to be as different items in a Dialog Box. I followed a tutorial on how to connect to a mysql server …

0
143
Member Avatar for linezero

[CODE]void merge() { if(start==NULL) { start=start2; } else { temp=start; while(temp->next!=NULL) { temp=temp->next; } temp->next=start2; } temp=start; if(start==NULL) printf("\nList is empty"); else { printf("\nElements of the list:\n"); while(temp!=NULL) { printf("%d\t",temp->info); temp=temp->next; } } system("pause"); system("cls"); main(); }[/CODE] the following code is use to merge two linked list into one and …

Member Avatar for thines01
0
182
Member Avatar for razamughal67

Hello everyone i want to get all file in a folder to a listbox using visual basic 6.0 example: i have many files in a foldre mp3,dat,mpg etc file in D:\musicfolder and we use a listbox and a timer or command botton when i click on command botton then listbox …

Member Avatar for razamughal67
0
5K
Member Avatar for codechrysalis

So im having great difficulty trying to have my program move onto the GetInput() methods and so on ...can anyone point me in the right direction and tell me whats going on? [B]write a program that allows any number of values between 1 and 10 to be entered. When the …

Member Avatar for codechrysalis
0
2K
Member Avatar for Yoink

I'm a beginner with python and I'm trying to write a program that asks the user for how many classes they have taken, then asks them for the class codes and prints the classes they have left to take. I can get the program to run perfectly for one list …

Member Avatar for Yoink
0
191
Member Avatar for thache

I've been trying to figure out whats wrong here, but I just can't wrap my head around it. My compiler outputs the following when I attempt to compile it. [CODE] z:\Desktop\tmp\proj4>cl proj4_linkedlist.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved. proj4_linkedlist.c …

Member Avatar for thache
0
339
Member Avatar for RLS0812

It's going on 4 hours now, and I have yet to find an answer on how to do this. All I want to do access and manipulate data in a list, from another class. The 2 classes: [B]GetList.java[/B] [CODE]public class GetList { public static void main(String args[]) { MakeList xx …

Member Avatar for FALL3N
0
304

The End.