Questions tagged [in-place]

Use this tag on questions about algorithms that modify the data in-place, as opposed to making a copy. For example, in-place sorting, in-place merge, etc.

Use this tag on questions about algorithms that modify the data in-place, as opposed to making a copy. For example, in-place , in-place , etc.

379 questions
-2
votes
1 answer

"Lengthless" fast sorting algorithm

I've been looking into sorting algorithms. So far, all the sorting algorithms I've found either rely on a known length (pretty much all sort algos. I can't use them because "proper" length is O(n)), or are slower than quicksort (e.g. insertion…
SoniEx2
  • 1,864
  • 3
  • 27
  • 40
-2
votes
3 answers

PHP in-place change a single key in an associative array?

Suppose I have this associative array: $fruits = array( 'red' => 'strawberry', 'blue' => 'banana', 'green' => 'apple', ); I want to change the key blue into yellow. Note that I want to change a key, not a value. I could do…
RocketNuts
  • 9,958
  • 11
  • 47
  • 88
-3
votes
2 answers

Emplace back fails at in place construction

I have an object that I want to construct exactly once, because the class it is in keeps track its objects by adding raw pointers to them. Constructing it inline seems to fail though: // Defined utilities: ModuleClusterPlot(Type typeArg, const int&…
Adam Hunyadi
  • 1,890
  • 16
  • 32
-3
votes
1 answer

In-place merge sort practical usage

I tried search here and there to find what exactly in-place merge sort and where I need to use it ? But not found a straight answer. Please help me by answering below. 1) When and where in-place merge is required ? Practical usage of in-place…
1 2 3
25
26