classificação

Parallelize odd-even sort algorithm in python

I developed the following serial code to perform Odd-even sort, which first sorts The Odd/Even indexes and then odd/even. im ... Approach 3? Suggestions? If there is no other more efficient way, I would like help to implement one of the two suggestions.

Sort DateTime field of a DataTable

Hello. I have the following DataTable: success: function (data) { $('#table-controle').html(data); ... of type DateTime, the data is ordered as a String and not as DateTime. Below are the example images: How can I solve ?

Problem in ordering insertion code of structs (records) in files

I'm doing a job where I have to insert structs alphabetically into files, where the structs are political and the files (whic ... rename("newfile.txt", sigla); //Renomeia o novo arquivo de modo que este fique com o nome do arquivo antigo. } } }

How to order a P: dataTable

How do I sort a datatable by a text. For example my system is a service order system, I need "open" orders to come first. Fol ... o.usuario as u where u.id" + " = "+UserStatic.getUsuario().getId() +"order by o.situacao DESC";

C++ - sort privately points of a rectangle in a vector?

I have a project in c++ where I should map regions of an image using the mouse click. The question is Should I get the mappin ... s not work for all cases. Would anyone know how to help me with this problem, if there is any solution? I appreciate it now.

(Python) sort lists without sort()

How to sort a list without using sort ()? The code below is correct, but the teacher does not want you to use sort(). The cod ... ] for x in range(8): n = int(input("Digite um número inteiro: ")) lista.append(n) lista.sort() print(lista)

sort PHP multidimensional array

I have the following array returned from a webservice (in the image I identify what I Want, below the text to copy paste if n ... ed in red. I tried using https://stackoverflow.com/questions/2699086/sort-multi-dimensional-array-by-value but to no avail.

Sorting in C using recursion

I need to make a vector ordering code using recursion. I searched about sorting methods and found two that would be interesti ... e second, third, etc. Another question: What is better to use for sort a vector with recursion: selection sort or quicksort?

(JAVA) help in sorting exercise (Selection Sort and insert)

/ * Exercise: write a method that puts in ascending order a disordered sequence of n integers. (a) using sorting by s ... for (int i=0; i<arrayInsercao.length; i++) { System.out.print(arrayInsercao[i]+" "); } } }

External and internal memory sorting algorithms

I was researching about the difference between external and internal memory sorting algorithms and found the following answer ... , there are several types of sorting but how will I know if this sorting algorithm is about memory Primary or secondary ?

What is the best implementation of the 'MergeSort algorithm'?

I know the quick Sort algorithm, but at the moment I want to parse the Merge Sort. I found on the internet two types of Merg ... // are already at the right position. } // ---------- End of MergeSort 2 ------------------------------ }

Vector of objects in C++

How do I make an object vector using c++? And how do I sort this vector of objects, for example, using some sort algorithm (q ... << "\n"; cout << jogo->idade << "\n"; cout << jogo->categoria << "\n"; return 0; }

Sort dictionary by Python value

I have a dictionary with the following format dic={759147': 54, '186398060': 8, '199846203': 42, '191725321': 10, '15894771 ... print on the screen. So that the output is. '158947719': 4 '186398060': 8 '191725321': 10 '199846203': 42 '759147': 54

Problem sorting an array with sort()

One of these occurs when I want to sort a array of numbers. Ex: var a = [44,7,5,6,4,2,1]; a.sort(); console.log(a); The ... mall array, but what I'm working on(with more than 300 occurrences) has happened the same. 115 appears before 2, for example.

Json encode return takes the asort order()

The asort() method is used to sort arrays, without losing the index. I do the sorting, both in the SQL search and in the arra ... function(k,v){ options += "<option value='"+k+"'>"+v+"</option>"; }); $("#consumidor_cidade").html(options);

Sort items from a Collection from a predefined value

I have a Collection from Eloquent and would like to sort it by two fields at once being one of them a predefined value. Ex.: ... ories with slug = "solicitacoes" was in alphabetical order, the problem is that the aforementioned were not at the beginning.

Input bugging for no reason

I made a program that computes (by a DB of its own using fstream) patients from a hospital. It has functions for output (one ... s - to. The program (with the requirements) would slow down, but probably wouldn't bug. Where's the mistake? How to arrange?

Vector ordering

I'm learning about vectors and matrices, and I haven't been able to solve a question in the right way for quite some time. T ... end end CriarVetor() Ordenar() ReOrdenar() for b=1, tamanho do print("A posicao "..b.." do vetor vale: "..vetor[b]) end

Insertion Sort [closed]

closed . This question needs to be more objective and is not currently accepting answers. ... d anyone give me examples of everyday life in which the insertion sort method is used? Obs.: Without being sorting letters

Calculate runtime of a C sort algorithm

I am having a doubt about how to get the runtime only in the sort algorithm. I ran a lot on the internet and found a lot of s ... = %.8f seconds\n", (double) (tv2.tv_usec - tv1.tv_usec) / 1000000 + (double) (tv2.tv_sec - tv1.tv_sec)); }