Most voted "classification" questions
Sorting algorithms are used to lay out the elements of a given list in a certain order defined according to a desired parameter.
Learn more…290 questions
Sort by count of
-
0
votes1
answer199
viewstable Angularjs ordering does not change
I’m making a call from the server to a list of users, the result comes smoothly, but the ordering is not working. HTML <div class="table-responsive"> <table class="table table-striped…
javascript angularjs classification angularjs-directivesasked 9 years, 3 months ago Victor Siqueira 638 -
0
votes2
answers974
viewsHow to make a datagridview C# sort a list (Ilist) by clicking on the grid header?
How to make a Datagridview C# sort a list (Ilist) by clicking on the grid header? For example, I have a list with three fields (id, name, city), when the user click on the column name, I want to…
-
0
votes1
answer435
viewsBlock alphabetical sorting in Datagridview
My Datagridview receives product data from a database. They are: description, unit price and quantity. I programmatically added a subtotal column and added the * quantity unit price calculation. As…
-
0
votes1
answer63
viewsDoes anyone know why there’s a glitch in this program?
void ordenar(struct piloto *vetor,int contador_pilotos) { int z,i,x,j; for(x=contador_pilotos-1;x<=1;x--) { for(i=0;i>x;i++) { …
-
0
votes1
answer159
viewsSort multiple Object arrays by value
people have the following situation: var input1 = {preco:valor1.toFixed(3), tipo:name1}; var input2 = {preco:valor2.toFixed(3), tipo:name2}; var input3 = {preco:valor3.toFixed(3), tipo:name3}; var…
-
0
votes1
answer964
viewsSort a list <ul> by the "value" attribute of <li>?
Talk personal, all right? So I got a problem... I have a "sort by" button, in this case, of higher price and lower price. What I need to do is sort the elements of a list <li> for his…
-
0
votes1
answer959
viewsSort dictionary by value and use rule if value is first python
I want to make a dictionary in python in which you will get diseases and scores ex: dic['alzhelmer']=3 dic['flu']=5 The program should put in order the diseases that scored the most for those who…
-
0
votes1
answer190
viewsapp ordering development, android firebase
good evening guys wanted to ask a question, I’m developing an app, and use firebase but I’m kind of layman still in programming, in order wanted to know if there is any way to sort the data that…
android database firebase classification android-recyclerviewasked 7 years, 6 months ago Eder Rodrigo Coffani 25 -
0
votes1
answer75
viewsCustom function for the Sorted function in python 3.x
In python 2.x I can pass a custom function to Sorted function, how to do this in python 3.x? Basically convert the code below def numeric_compare(x, y): return x - y print(sorted([5, 2, 4, 1, 3],…
-
0
votes0
answers337
viewsVector ordering
I’m learning about vectors and matrices, and I haven’t been able to solve a question in the right way for a long time. The statement says: Given some vector, sort it in sequential (numerical).…
-
0
votes2
answers659
viewsProblem using print to show function result
I’m creating a function that scrambles and returns the typed word, but I don’t know how to use the print (if this is really the case) to show the result of the function below: def f(): a = [] x = 0…
-
0
votes1
answer92
viewsCustom sorting in Python
I have a list foo = ["BCB", "CAB", "CBC"] and a specific alphabetical order bar = "ACB". The result with that specific order should be resultado = ["CAB", "CBC", "BCB"] How do I sort that list?…
-
0
votes1
answer1221
viewsAutomatic classification with tiebreaker criteria
Good afternoon, using the automatic classification of excel, is it possible to create levels and sublevels? For example, I am creating a football spreadsheet and want to sort first by score and if…
-
0
votes2
answers407
viewsSort objects in json file (Java)
I have the following JSON file: {"idAluno":1,"nomeAluno":"Teste","listaDeTurmas":[1,2,3,4]} {"idAluno":4,"nomeAluno":"Teste","listaDeTurmas":[1,2,3,4]}…
-
0
votes2
answers90
viewssort list c lambda
alfabeto = {'t':0, 's':1, 'h':2, 'j':3, 'm':4, 'p':5, 'n':6, 'z':7, 'w':8, 'l':9, 'r':10, ' c':11, 'b':12, 'x':13, 'k':14, 'q':15, 'v':16, 'd':17, 'g':18, 'f':19} d = open('txtA.txt', 'r') ordenar =…
classificationasked 6 years, 10 months ago fernanda 125 -
0
votes1
answer294
viewsBubble Sort in Python3
def bubble_sort(list): for i in range(len(list)): for j in range(len(list)-1): if list[j] > list[j+1]: list[j], list[j+1] = list[j+1], list[j] else: continue I just made this Bubble Sort, but I…
-
0
votes1
answer110
views"Segmentation Fault" in a function that performs Quicksort
I am doing a job that asks to create a quicksort function to alphabetically sort a txt file, but it is showing the error: Segmentation fault In the main function I call the function so:…
-
0
votes2
answers1690
viewsChange Python string
I’m making a program to sort the numbers entered (I can’t just use a sort algorithm), searching saw that it is not possible to change strings in python, is there any way to do this? Or maybe use…
-
0
votes1
answer174
viewsHow does "array.Sort()" work?
How does the array.sort((a, b) => a - b) ? Why is this symbol =>, and why this operation a - b Are you subtracting the elements? That doesn’t make sense to me.…
-
0
votes0
answers19
viewsSearch and order of the elements
If I have a data set containing 50 elements, of those 50 I need there to be an iteration to show 10 out of 10, the first 10 and then successively. If within this same set with 50 elements I need to…
-
0
votes1
answer32
viewsSort name of php file
I have a php code, which I use to make files available to clients, but I need it to sort the file name from the largest to the smallest, for example, I have the files: 2019 Arquivo 1 2018 Arquivo 2…
-
0
votes1
answer197
viewsSort by year SQL data
I have a table with 2 columns (one with date (YYYY,MM,DD) and another with a numeric value). I want the table to be ordered only per year and in case of entries with the same year the "tie-breaker"…
-
0
votes1
answer112
viewsHow to reorganize Ivs (moveup / movedown)
I need to insert text blocks and then have the freedom to reorder them. In the first inserts it works, then the Divs start to get lost and the first jumps to the last for example, when in fact it…
-
0
votes2
answers86
viewsTargeting failure in Mergesort
I tried to recreate the Mergesort algorithm in C++, but when compiling, the error "segmentation fault" appears. Here is the code below. What could I be doing wrong? #include <iostream> using…
-
0
votes1
answer589
viewsAlphabetical sorting in Array with objects in PHP array
I have the following array in php: Array( [0] => Array([id] => 1 [nome] => b parceiro um [status] => true [descricao] => <p>Descrição do parceiro</p>) [1] => Array([id]…
-
0
votes1
answer62
viewsMake Sort of a list
I am trying to make a Sort of a list that has information from a text file, to fetch the information from the file I use: string ficheiro = "tvInfo.txt"; List<string> Classificacoes; var linha…
-
0
votes0
answers60
viewsProblem with alphabetical ordering in the Aravel?
I have a query in Aravel that lists me all the users that exist I want to sort by alphabetical order but the way I put that by the documentation of the Aravel and as I have done does not order…
-
0
votes0
answers32
viewsBucket Sort C help me
Good afternoon everyone, I would like to thank you first because you have already helped me a lot, but I need your strength again. I have a work in which I must use the ordering method Bucket Sort…
-
0
votes0
answers45
viewsComplexity of Strand Sort algorithm
I’m using the Strand Sort to do a college job and wanted to know if at level of complexity, in worst case it O(n 2). and I wanted to know under what circumstances it would be better to use this…
-
0
votes2
answers66
viewsVIEW DICTIONARY ALPHABETICALLY - PYTHON
I have a dictionary that has 2 keys (name, age), within each there is a list of values. I need to put the names in alphabetical order and that the ages accompany the respective owners. That’s the…
python python-3.x classification dictionaryasked 3 years, 10 months ago Henrique Marvin Souza da Silva 28 -
0
votes1
answer24
viewsSort data in dataframe pandas by repeating frequency of each element
I have a dataframe and I want to organize the data by the frequency of appearance of each element. From the most repeated to the least repeated, to create a ranking. I want the organization to be…
-
0
votes1
answer16
viewsWhat is the difference between Kneighborsclassifier and Nearest Neighbors?
I know the concept of neighborhood algorithms but came across two implementations in the Sklearn library Nearestneighbors and K-Nearestneighbors, but I could not understand the difference, it is…
-
0
votes2
answers205
viewsSort files by name c#
I have several files like this: - C:\ByMe\SOLUTIONS\Dictation1\Database\Updates\2017\2017_04\20170405_TR\1_CREATE_TABLE_BMTApprovalGroupExam.sql -…
-
0
votes2
answers2327
viewsObject vector in C++
How do I vector objects using c++? And how do I sort this array of objects, for example, using some sort algorithm (quicksort, mergesort, shellsort or radixsort)? #include <iostream> using…
-
0
votes1
answer2102
viewsC ordering using recursion
I need to make a vector ordering code using recursion. I looked into the sorting methods and found two that would be interesting: Lection Sort and Quicksort. However, I tried to use Selection Sort…
-
0
votes1
answer93
viewsSort by Reflection with Getproperty
I have a generic class with a method that needs to sort a generic object. However, give error saying that does not recognize the Reflection Getproperty method, because lambda can not translate. How…
c# asp.net-mvc entity-framework classification reflectionasked 7 years, 9 months ago LeoFelipe 1,455 -
0
votes1
answer510
viewsSort by date and name Arrayadapter
I am using "Comparator" to sort my listview. Sort only 1 element, it is working, but with two the same does not work. //ordenar por data arrayAdapter.sort(new Comparator<Vagas>() { @Override…
-
0
votes2
answers36
viewsCreating a custom Writablecomparator class
I’m creating an application to process distributed video in Hadoop using the paradigm map-reduce. I have several videos stored in the cluster and wish from them to create a single video file. For…
-
0
votes1
answer101
viewsError in the interlayer method elements with Mergesort in a List<Integer>
This part of the algorithm has the function of bridging the elements of a List<Integer> (list of normal integers) using the Mergesort sorting algorithm. ERROR ON LINE 7 private static List…
-
0
votes1
answer1116
viewsVisualg - 5 larger issues
I’m getting 5 values and need to sort from smaller to larger, without using loop or array. I was only able to discover the smallest and the greatest; how could I discover the middle ones? Follow…
-
0
votes1
answer232
viewssort with Angualrjs / orderby by a field that will be created later
I am using Ionic 1 with Angularjs. I need to sort a result by a field that should be created later, the field is the distance from the first company address, in orderby do not know what to put, and…
-
0
votes1
answer512
viewsSorting by name and number plate
I have this List simply chained and n know how to order it. I need to sort by name and number. #include <stdio.h> #include <stdlib.h> void BuscarMatricula(); void Inserir(); void…
-
0
votes0
answers298
viewsUnderstanding the Quick Sort algorithm graphically
I have this code below working correctly. #include <stdio.h> #include <stdlib.h> #include <string.h> void quicksort (int *vetor, int inicio, int fim) { int i, j, meio, aux; i =…
-
0
votes1
answer340
viewsInsertion Sort in pascal
I have to implement the ordering method Insertion Sort in Pascal. The problem is that in my algorithm I’m having to do several ifs. One for each possibility. I wonder if there is a better method to…
-
0
votes1
answer79
viewsI’m not managing to sort the notes with the use of struct
I wanted to sort the grades of the students, only I’m not able to do because at the time of receiving the grades I’m using the index j, I think that’s the problem only I don’t know how to solve.…
-
0
votes0
answers55
viewsOrdered score from A to Z
I have a query, which I imagine is in object-oriented php, which in my case I’m at the beginning of studies(I know I’m late). I have a platform Xtech, and at the time of display of some features, I…
-
0
votes1
answer226
viewsTrouble sorting code with Shellsort
#include <stdio.h> typedef struct { int id_submissao; int tempo; int id_equipe; int id_problema; char status; } Linha; void shellSort(Linha *v, int n) { int i = (n - 1) / 2; int chave, k, aux;…
-
0
votes1
answer825
viewsHow to implement a generic Mergesort sorting algorithm?
How to implement an sorting algorithm Mergesort generic (with function pointer and pointer void) in that capacity? #include<stdio.h> typedef struct{ inta; intb; }XPTO; void criaVetor(XPTO∗v,…
-
0
votes1
answer2428
viewsCalculate execution time of a sort algorithm in C
I have a question about how to get the run time only in the sort algorithm. I searched a lot on the Internet and found a lot of superficial stuff, nothing that would help me in what I need. I have a…
-
0
votes0
answers34
viewsSort 3 arrays according to the first array
I have 3 separate arrays in $Students, $sites, $considerations. I’m trying to sort my data output by $Students array. When I sort the $Students array, the other two arrays that have line-to-line…