250 Topics

Member Avatar for
Member Avatar for Morten Brendefu

There are many places on internet for great help regarding many things. Proper implementation of really fast routines for sorting data however is not common. I am not claiming these routines to be the fastest around, but their ease of implementation and use may make them welcome. As a thank …

0
244
Member Avatar for ahoysailor

Ok, so basically I have a text file that contains the following: Resource3 "Actuator" Resource10 "Insert Exhaust Valve" Resource1 "6, 10, 18, 1" Resource21 "Emergency Stop" Resource2 "Cool Down in Progress" etc. etc. I want to read the file line by line and store it in a vector (this is …

Member Avatar for mrnutty
0
174
Member Avatar for rutwvu

I was asked to write a program, based on parent-child cooperation, which uses a “parallel” merge sort to a sequence of 800 numbers from a text file.I have to read the sequence of 800 integers, which I store in an array, and then pass half of them to a child, …

Member Avatar for rutwvu
0
1K
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 nixufix

Hi everyone, First off - I'm very new to Java so please be gentle. I'm having some problems with an assignment from school: [B]Input[/B] The input starts with an integer k indicating the number of words in the text (max 1000), followed by k words. [B]Output[/B] The output will consist …

Member Avatar for JamesCherrill
0
1K
Member Avatar for A&M_guy

I am new to structs and I am trying to sort an array of structs but I can't seem to get it to work, I can't figure out what I am doing wrong and any assistance would be very much appreciated! [CODE]#include <iostream> #include <fstream> #include <iomanip> using namespace std; …

Member Avatar for A&M_guy
0
264
Member Avatar for Adnan671

So, it sorts the books by price just fine, but I cannot get it to sort the books by title. I am most likely over thinking this, but I've spent a couple hours trying to figure it out. I've looked online and couldn't find the answer. I'm guessing the problem …

Member Avatar for raptr_dflo
0
3K
Member Avatar for optimumph

I'm trying to sort an array of numbers in ascending order and don't know whats wrong with my code (I'm completely new to vectors). I should first copy the input array (data) into an STL vector, then apply STL’s sorting algorithm to the vector, and finally copy the vector back …

Member Avatar for mzimmers
0
216
Member Avatar for fanfunstar

Anyone can help me with this algorithm? 1 set up stack in and print it 2 while stack in is not empty repeat 2.1 max = in.pop 2.2 while there are still element in stack in repeat 2.2.1 value = in.pop 2.2.2 if value > max 2.2.2.1 temp.push(max) 2.2.2.2 max …

Member Avatar for raptr_dflo
0
2K
Member Avatar for Frankey

i am looking for some advice on what is the best approach to get this done :) my datababase holds a table categories with the columns [CODE]|category_id|category_name|category_parent_id|[/CODE] i am showing my users a html sortable table with the following columns |category_id|category_name|category_parent_name| so what i want, is to do a ORDERBY …

Member Avatar for Frankey
0
254
Member Avatar for scarlettmoon

Hi ~ Before posting my code, can someone tell me if it is possible to do a dual sort on an array of chars and an array of int, double or float? Would you have to use two separate sorts? Really confused here. I am trying to sort an array …

Member Avatar for phfilly
0
520
Member Avatar for dsotelo91

Hi there. I am trying to get a selection sort working on assembly language, using the Irvine32.lib. This is my first time taking an assembly language class and I am struggling with this program a lot. Here is the code. [CODE] TITLE MASM Template (main.asm) INCLUDE Irvine32.inc .data array1 DWORD …

0
536
Member Avatar for challarao

I wrote this program for insertion sort.I compiled the source file in xubuntu terminal.But when I try to run a.out executable....terminal showing "segmentation fault".I don't about segmentation fault..when segmentation fault occurs...what is the thing in the source file that is causing segmentation fault... Thanks in advance...... [CODE]#include<stdio.h> main(){ int i,j,n,key; …

Member Avatar for challarao
0
366
Member Avatar for Alba Ra

Hello, I'm still trying to work out the same problem: how to process data from an Excel sheet (above all sort through it but in groups; will explain further down) to use in a Cluster Chart without storing it as data in an Excel sheet. The problem at hand: I …

0
422
Member Avatar for ryanfsf

i want to ask something about my assignment. heres the code [CODE]#include <stdio.h> int main() { int nilaiuts[5],nilaiuas[5],nilaitugas[5]; int i; float total=0; printf("Masukkan nilai UTS mahasiswa [5 mahasiswa] :\n"); // proses memasukkan data ke array for (i = 0; i < 5; i++) { printf("Mahasiswa %i : ", i+1); scanf("%i",&nilaiuts[i]); …

Member Avatar for WaltP
0
209
Member Avatar for TrustyTony

By coding algorithm and using some liberal prints with small set of data, you can learn to understand the basic algorithms better than just reading about them. Here simple selection sort.

Member Avatar for TrustyTony
0
208
Member Avatar for Wiemers11

I'm new to python and I'm trying to write a selection sort code starting with the last digit and eventually working its way to the first but I'm getting an error that the index is out of range... anyone know what's wrong with my code? inputfilename = raw_input("What is the …

Member Avatar for TrustyTony
0
209
Member Avatar for Coffee_Table

I am trying to determine the time complexity (and space complexity if anyone would like to have a go at it) of a sort function i implemented with a custom comparator. it is the sort function from the STL <algorithm>. First off, I am using Visual C++, so I am …

Member Avatar for Narue
0
578
Member Avatar for kangkan_14

Here is a part of code I am writing.I am getting a segfault in the CmpFunc function. The segfault occurs when I compare *a and *b i.e in the "if(*a>*b)" line. I am new to function pointers. So, I might be making a mistake somewhere which I don't realize.I would …

Member Avatar for kangkan_14
0
2K
Member Avatar for needpython_help

Hi everyone, I'm new here so I hope I've put this in the right place. I'm looking for a little help with a python program I've written. I'm trying to create a timeline from SQLite databases. I take information from a calls database, then an sms database, write those to …

Member Avatar for Enalicho
0
832
Member Avatar for ginnipig

Hello all, I have a DataGridView that is being populated via SQL with one table and is being filtered by Stock Code. I need to sort the view of one Stock Code by Nutrient names, but the sequence number is in anther SQL table. it would be easy if i …

Member Avatar for ginnipig
0
127
Member Avatar for baby_c

Hello Friends.. need a help with Merge Sort I tried to implement Merge Sort using Java language..I followed Introduction to Algorithm book for the algorithm.. but the code generates errors.. please can anyone explain this to me.. why these errors pop-up ?? [CODE] package test; import java.util.Random; public class mergeSort …

Member Avatar for JamesCherrill
0
374
Member Avatar for SG01

How can I sort label names on buttons within a form. Automatically sort the names and put into the correct place within the form. A-Z order sort can be left to right. Want some sensibility to the form not all mixed up.

Member Avatar for adam_k
0
166
Member Avatar for TrustyTony

This does not look very efficient with transponation, sort and transponation back, so I am happy to hear about better alternatives.

Member Avatar for TrustyTony
0
328
Member Avatar for pril

[code]#include <stdio.h> #include <stdlib.h> int main() { int numbers[10] = {12,33,51,1,-1,97,7,23,0,-99}; sort(numbers,10); display(numbers,10); return 0; } void sort(int *numbers, int size) { /* Hop you could help me provide codes to sort the numbers. after calling this function, the numbers array in main should be sorted. hint: use the size …

Member Avatar for Narue
0
162
Member Avatar for andylbh

The code below is what I have done up so far. I'm currently trying to complete one of the 4 classes I have, so the codes are incomplete and made to work at it's current stage. Q1. I need to have 3 different sorting criteria: 1.Sort by X (asc/desc) 2.Sort …

Member Avatar for mike_2000_17
0
781
Member Avatar for techie1991

I was looking at a question: Q. Given n numbers of which all numbers are repeated (at least once) other than one. We have to find that number. Numbers range is to 10^9, thus using count sort would do no good.! Adding the numbers one by one to a dictionary …

Member Avatar for youwill
0
103
Member Avatar for karthik.chopper

Hey guys, I have a problem. I created a quick sort program and it functions perfectly for quantity less than 100. I searched for errors and changed and now for more than 100 values, it runs perfectly and sometimes it hangs. I am unable to decipher whats the error. Did …

Member Avatar for mbulow
0
404
Member Avatar for JakeA

hi there! i am using a radgridview(a datagrid in telerik). can you give me a code that sorts the contents of the datagrid? there is an ascending/descending button wherein users can choose how they want the data to be sorted. there is also a combobox that contains the column names …

Member Avatar for Saikalyankumar
0
117
Member Avatar for shazzy99

[COLOR="Green"]Trying to take input from user, put it in array and do the sorting[/COLOR] The code is: [CODE] #include <stdio.h> #include <conio.h> #include <stdlib.h> class Sort { static int array[5]; static int index; static int i; public: void insert(int num) { array[index] = num; index++; } int sortarr(const void *x, …

Member Avatar for Narue
0
182

The End.