163 Topics
|
|
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); } … |
|
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, … |
|
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? |
|
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. … |
|
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 … |
|
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 … |
|
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, … |
|
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 … |
|
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 |
|
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 … |
|
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 … |
|
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() … |
|
anybody know how to sort item in combobox and listview in alphabert or numeric |
|
|
|
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 … |
|
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 … |
|
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: … |
|
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 … |
|
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, … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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() … |
|
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: … |
|
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. … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
The End.