classificação

How to implement a generic MergeSort sorting algorithm?

How to implement a generic MergeSort sorting algorithm (with function pointer and void pointer) in this function? #include&l ... riaVetor(v,10); ordena(v,sizeof(XPTO),10,porA);//<−exemplo de chamada da funcao ordena imprimeVetor(v,10); return 0; }

Bubble Sort on Python3

def bubble_sort(list): for i in range(len(list)): for j in range(len(list)-1): if list[j] > list[j+1]: ... r greater (I), I would like to know how to stop all interactions when the list is sorted / know when the list will be sorted

Sequential numbering of query results

I'm not very close to database, and in fact I don't even need such functionality, but just out of curiosity, is it possible t ... olumn. Or still I could assemble an unordered list and renumber with CSS(3). But and directly by the query? Is it possible?

What does it mean to "sort an array", either by rows or columns?

What does it mean to "sort an array", either by rows or columns?

Bucket Sort-C

I am having problems implementing the Bucket Sort method, I need to test it 30 times with different amounts of data, but when ... d\n--------------------------\nTempo da Ordenação: %.3fs\n--------------------------\n",i+1, timedif); } return 0; }

Sort using tiebreaker criteria

I need to sort a list of objects with the following criteria: higher average proficiency levels in each of the technical ... only one object that can remain after all the eliminations? Is it possible to order only once to get the" biggest " element?

Stable vs unstable sorting

What defines a stable sorting algorithm? This question has already been talked a little about what is stable and unstable or ... ds be? Ex: int vec[5]={4,2,5,1,7}; If I wanted to sort this vector what would it be to preserve the order of the records?

Ordering letters in Python

I have a list of the cards and the suit of a deck that I need to sort. Considering the correct order: A, 2, 3, 4, 5, 6, 7, 8, ... ) dados = arquivo.readlines() dic = {} for linha in dados: linha = linha.split() dic[linha[0]] = linha[1] print(dic)

Sort a multidimensional array with numeric values

Suppose the following situation in which I have a array consisting of several array with numeric values: $array = array( ... ows: $array = array( array(22), array(22, 23), array(22, 25, 28) ) What would be the algorithm for this case?

BubbleSort complexity calculation

I would like to know how I can demonstrate by calculation induction the complexity of the bubblesort algorithm, both in the b ... i] = alist[i+1] alist[i+1] = temp alist = [54,26,93,17,77,31,44,55,20] bubble_Sort(alist) print(alist)

Python sorting of dictionary list by key and value in distinct orders

How to sort a list of dictionaries for example: nomes = [{'nome': 'joao', 'sobrenome' 'alves'},{'nome': 'joao', 'sobrenome' ... order the names in reverse order, the surnames this is: in the normal sense the name and in the reverse sense the surname

Ordering with certain condition

I asked the question who will be reproached? that had the rule the students would be ordered according to the number of prob ... pessoa[i].nota = pessoa[j].nota; pessoa[j].nota = aux; } } } } }

How to create a Stopwords using R

Oi, I need to do a task and I'm not coming up with a logical reasoning. My scenario is: I have a DF with several columns, ... tros pedro assis programador. Python Could someone tell me if I create a stopWords is that the best way to solve it ?

(Clarification) artificial intelligence word classification (Python) [closed]

Closed. this question is out of scope and is not currently accepting answers. ... ef edits2(word): //"All edits that are two edits away from `word`." return (e2 for e1 in edits1(word) for e2 in edits1(e1))

Best worst case sorting algorithm

I want to know which algorithm performs best when dealing with its worst case compared to others each dealing with its own wo ... s accepted but also the factor of this term in the formula of comparisons or experimental measures of time in large problems.