163 Topics

Member Avatar for
Member Avatar for mushahidh

CONVERT THIS QUICK SORT PROGRAM INTO PARTITION OF 3,5,7OR 11 ELEMENTS. [CODE] #include"stdafx.h" #include<iostream> using namespace std; #include <stdio.h> #include <stdlib.h> #define size 50 void swap(int *x,int *y) { int temp; temp = *x; *x = *y; *y = temp; } int partition(int i,int j ) { return((i+j) /2); } …

Member Avatar for Momerath
0
218
Member Avatar for Morten Brendefu

I did an experiment regarding sorting of 256.000 random "names" using TListBox component. A friend of mine say that TListBox is faster than my code at sorting, so I wanted to test this out of curiosity. Method of testing. When I have created 256 thousand random textstrings, each 6 characters, …

Member Avatar for TrustyTony
0
2K
Member Avatar for mushahidh

Implement Quick sort algorithm with partition of 3 elements, partition of 5 elements, partition of 7 elements, partition of 9 elements and partition of 11 elements for the data set of 10000 elements. Can anyone tell me what is meant by "partition" in the above?

Member Avatar for rubberman
0
172
Member Avatar for TheSassyDragon

Trying to understand two dimensional vector and was wondering if anyone could help me out on a sorting code for this so that it numbers 0-9 people, gets x number with each of them and then outputs the person (number) ate x pancakes - But in descending or ascending order. …

Member Avatar for TheSassyDragon
0
153
Member Avatar for Thendi

Hi I am trying to put quicksort in my class like other methods and call it using the main method, I did it for Selection, Insertion, Bubble Sort and I need one more which is quicksort. I already made the calling code for quicksort but I don't know how to …

Member Avatar for Thendi
0
648
Member Avatar for tomrock_shi

i have this list, about some company payment , in the list, some company pays two times in a particular day. i need to write a perl program to add up the company's total payment for that particular day such as eid date amount 00101 2009-12-21 3009 00101 2009-12-21 165 …

Member Avatar for d5e5
0
87
Member Avatar for NvIs

I'm having a hard time understanding how to sort loops and the different types. I've read several articles, reviewed several programs, and still cannot grasp how to sort arrays let alone do anything else with them, I.E. add rows/columns, find the mode, ect... I know the different types of sorts, …

Member Avatar for thekashyap
0
160
Member Avatar for mcatominey

Hi, I want to be able to sort a multidimensional array using its second dimension to sort the first. It is a list of sporting teams with points stored like this: [CODE]$teams[$teamnumber]['points'] $teams[$teamnumber]['players'] $teams[$teamnumber]['name'][/CODE] These teams are to be shown in a league table which is why they needed to …

Member Avatar for mcatominey
0
164
Member Avatar for ssreevidya.m

hi, i want to create a custom gridview control with paging, sorting and filtering. I tried a lot of for it , but didnt get it correctly. Can you give me the code for it. thanks in advance, sreevidya

0
121
Member Avatar for rjbrjb777

hello friends, I have generated a csv file with 27 columns. third column is of time and i want to sort all the data according to this column in ascending order. so can you please tell me how to do this.? i have no clue where i should start. i …

Member Avatar for WaltP
0
4K
Member Avatar for rockerjhr

I need to use mergesort to sort the data in a file that has the names and ages of 10 different people , first i have to sort the names in ascending ascii order and then i have to sort them by their age but im not sure how to …

Member Avatar for rockerjhr
0
210
Member Avatar for toritza

Hello. I am have a problem while trying to write to a file some sorted lines . my initial file is somthing like this name2,number2;name3,number3;name1,number1 when i run this code ord = open("Be.csv", 'r') order = ord.read().split(";") order = sorted(order) for sort in order: print sort ord.close() f=open("Odd.csv","w") f.write(sort) f.close() …

Member Avatar for toritza
0
172
Member Avatar for arezz09
Member Avatar for codeorder
0
124
Member Avatar for feoperro

Hi, I would like to know if there is a way to sort data in a table, not when selecting it, but the actual data in the table. I would like to sort it by 2 columns though. For example the "topic" should go from A-Z and then inside all …

Member Avatar for feoperro
0
191
Member Avatar for c++coder

Hi. I was wondering if someone could help me out with a project. The assignment says to call a void function called InsertIntoArray passing the array, the entry the user entered and place the positive integer into the correct element of the array so that the array is always in …

Member Avatar for c++coder
0
1K
Member Avatar for JGriffCS

I'm trying to create a class that reads in a set of numbers from a file, stores them in a generic array, and then sorts them using the generic bubbleSort method. I usually write in C++ and the switch from templates to generics hasn't been easy. I'm fairly certain my …

Member Avatar for JamesCherrill
0
694
Member Avatar for lxricher

Here is my code [code].section .data values: .int 0 array_end: .equ ARRAY_SIZE, array_end - values array_fmt: .asciz " %d" usort_str: .asciz "unsorted array:" sort_str: .asciz "sorted array:" newline: .asciz "\n" maxvalue: .int 1000 format: .asciz "%d" message: .asciz "Please enter a maximum size for the array to be sorted." output: …

0
155
Member Avatar for TrustyTony

I had posted here already here to forum a [beautiful code for solving Sudoku puzzles](http://www.daniweb.com/software-development/python/code/294304/eleagant-and-fast-sudoku-with-generator-expressions), so I was in kind of dilemma what to do, as I read the task to do a sudoku solve as one task in Project Euler. To use the code from before and just take …

Member Avatar for TrustyTony
0
867
Member Avatar for cozmo87

I'm reading the filenames/directories of all the files within a folder into an array of Files. The filesnames are all of the type: Name1, Name2, Name3, Name4, Name5, Name6, Name7, Name8, Name9, Name10, Name11, Name12, Name13 The above shows the correct order in which the files [B]should[/B] be ordered. However, …

Member Avatar for BestJewSinceJC
0
202
Member Avatar for old_kid

Please let me know if I should make something more clear 1. Each item in list contains a tuple with its name -> ((value, work), 'name') 2. the function "sort" below sorts the list of subjects by "value" in descending order 3. I get: TypeError: 'int' object is unsubscriptable (occurs …

Member Avatar for griswolf
0
3K
Member Avatar for beejay321

Im supposed to write a program that reads in 10 c strings and will sort them alphabetically using (strcmp(list[h],list[j])>0) which basically says if list h is closer to the start of the alphabet then it is true else it is false here is my code [CODE]#include <iostream> #include <cstdlib> using …

Member Avatar for peter_budo
0
2K
Member Avatar for ankit,joy

I have to [B]sort around 12GB of integer data[/B] which is kept in a file. I have a [B]1 GB RAM[/B]. How should I do it? The problem is I cant read whole of data together and store it in a vector because it goes out of memory bound. Which …

Member Avatar for arkoenig
0
498
Member Avatar for eshko

Hello every one! I'm developing one simple site, and I need to make an "archive" script. My MySQL Table looks like: [CODE] | id | title | content | is_deleted | pub_date | [/CODE] *pub_date is in PHP time() format. Example: 1258150430 So, what I want to make is an …

Member Avatar for chocalate
0
2K
Member Avatar for aligajani

I want to sort the getSal values in the myList. It should be a sorting algorithm implementation so that adding or removing objects does not affect the performance. [CODE]import java.util.*; public class payment { public String name; public int salary; void setName(String _name) { name = _name; } String getName() …

Member Avatar for aligajani
0
175
Member Avatar for brianmitchell

Hey all so im a bit new to python and I need to create a select sort function without any for or whiles but this is all i have so far any help would be greatly appreciated. [CODE]def selection_sort(list): l=list[:] sorted=[] while len(l): lowest=l[0] for x in l: if x<lowest: …

Member Avatar for seanbp
0
206
Member Avatar for scoob

i am trying to import into a 2d array the following: line one : gpa e.x.[2.3,5.1,....] ^ ^ | | line two : id e.x.[1 ,2 ,....] and after that to sort the gpa in a descending way but in the same time the id to follow each ones gpa. …

Member Avatar for scoob
0
225
Member Avatar for pichi20

Hey, I'd appreciate if someone would help me modify this code so the descending order can be displayed on the screen , here it is.... [CODE] #include <iostream> // ostream #include <vector> #define SIZE 10 using namespace std; int partition(vector<long unsigned int> & a, int start, int end) { unsigned …

Member Avatar for pichi20
0
1K
Member Avatar for danholding

im a newbie to python still so bare with me if i have gone down the wrong route or my explanation is confusing!! any ideas on how i can sort my list by the size of the file at the moment it is getting the size of the file and …

Member Avatar for TrustyTony
0
238
Member Avatar for danholding

hi guys n girls im making a list of the biggest files on my computer i have got most of the coding done but i have hit a brick wall with the sort function. i can sort the size or the file name but as they are both in the …

Member Avatar for VulcanDesign
0
522
Member Avatar for challarao

Hi,please help me! I wanna write a program for gauss jordon elimination ,for that I need to sort/exchange the rows such that the rows are in order of their increasing zero elements before non zero element in each row like below suppose, input 0 0 3 4 5 0 3 …

Member Avatar for Adak
0
175

The End.