8 Topics

Member Avatar for
Member Avatar for chrisl007

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 …

Member Avatar for chrisl007
0
223
Member Avatar for dbsp

I am trying to sort an ArrayList of Strings using the Merge Sort algorithm. However, I am having an error where it occurs on line 67 **`result.set(i,right.get(r));`** Where I get the IndexOutOfBoundsException. I have tried printing out the index of the result, and it seems to be that I am …

Member Avatar for wen_cai
0
817
Member Avatar for jim_underpants

Assume that we have a mergesort algorithm which takes 2 series as an input and returns 1 after the merge each time. So that if we want to count say memory blocks we would need 2 blocks for the input and 1 for the output accordingly, total size of 3 …

Member Avatar for Rashakil Fol
0
196
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 cNew

Hi! What could be the best algorithm for "Merge Sort" where the memory must be used "most effectively"? I just know the standard way to do this, but that's not the most effective way how to use the memory. This is the only variant which I know: [CODE=c] #include <iostream> …

Member Avatar for Narue
0
208
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
209
Member Avatar for jaku78

Hi. Basically I first made some code to do mergesort on a list of numbers. Worked like a champ. Then I said, what the heck, why not do a mergesort on an array of structs, this is where it gets a little funky. While the first sort of the data …

Member Avatar for dkalita
0
106
Member Avatar for Basteon

Hi! I'm writing the mergesort algorithm, theoretically everything is fine in it but when the function gets to call itself the program crashes. I belive that I'm doing something worng when I pass the vector<int> as a parameter to the function. [B]procedure mergesort(T[1 .. n]) if n is small then …

Member Avatar for Basteon
0
1K

The End.