I want to write a code for Radix Sort based in this way how I made the Quick Sort, how can I do with Radix Sort, can anybady have any idea I have search a lot but I can not find any exactly what I need #include <iostream> #include <conio.h> #include <time.h> #include <stdlib.h> //srand and rand functions using namespace std; void add_random_numbers(long arr[], long b); void QuickSort(long vektori[], long left, long right); long const MADH_MAX_VEKTORIT = 110000; int main() { long random_vector[MADH_MAX_VEKTORIT]; long vector[] = { 1000, 10000, 15000, 25000, 30000, 45000, 50000, 60000, 75000, 90000, 100000 }; long …

Member Avatar
Member Avatar
+0 forum 1

Hello, as it can be inferred from profile, I am new. I have read the community guidelines and I have done prior research. I am a very weak coder(through my own fault). However, I like to believe I firm conceptual understanding. **So What is my problem?** I have an assignement that requires analysis of three fast sorting algorithms(radix, quick sort, and merge sort). The exact specifications are as follows: 1. Design and implement a variation of QuickSorter class that partitions the sequence to be sorted using the pivot other than the first element in the sequence. Run a sequence of …

Member Avatar
Member Avatar
+0 forum 3

I want to modify this Radix sort C++ to work with strings only. I want to sort words not numbers. I don't know what to change or where to change it. Any suggestions? [CODE] // CS 9F // March 3, 2012 // Include files #include <iostream> // used for cin, cout #include <conio.h> #include <fstream> // file input/output #include <queue> // class for queue's #include <string> // used for string's using namespace std; // Global Type Declarations typedef queue<string> Q; // Function Prototypes void instruct(void); void pause (); int main() { // Declaration section Q holder, tempholder, sorter[10]; const char …

Member Avatar
+0 forum 0

As [URL="http://www.daniweb.com/software-development/c/threads/377568/1625821#post1625821"]Goddess Narues' C code in C forum[/URL] was over my head and her critique of simplistic solution maybe overflowing the integer range was valid in C, I worked out a recursive solution more suitable to my brain in my preferable language. Maybe one day I put in C, now I am too lazy for that. Funny thing is that my simplistic solution is completely sufficient in Python as it has unlimitted precission integers. This code deals any numeric base and also explains about issue is 100 palindromic or not and how to accept or refuse it according to your …

Member Avatar
+0 forum 0

Here's a function that manually converts an integer to any base between 2 and 36, the parameter list is: [CODE]void toBase( int value, // Integer value to convert char *target, // Pointer to a large enough buffer int base, // Base (from 2 to 36) int fixedDigitCount // The minimum number of digits it must contain );[/CODE] This gives me the following output:[QUOTE]Binary with no fixed number of digits (1 to 15): 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111 Binary with 4 fixed digits (1 to 15): 0001 0010 0011 0100 0101 …

Member Avatar
Member Avatar
+0 forum 2

I wrote this small program for a class im taking, and its supposed to take an int n and a radix (int between 2 and 16) r and give me the number converted to the new base. It only has to go from decimal to other radix's. I run my program and put in the input but for some reason im getting a segmentation fault. I know this means I most likely have a memory allocation issue but i don't know where, why, or how to find it. Can someone please show me where I went wrong? [CODE=C]/*Adam Ross Cohen …

Member Avatar
Member Avatar
+0 forum 2

The End.