Questions tagged [sorting]

Sorting is the process of applying some order to a collection of items.

Filter by
Sorted by
Tagged with
0
votes
0answers
30 views

Designing a 2D Bin-Packing Algorithm, which supports arbitrary item weights and limits

I'm trying to develop an algorithm for a complex sorting issue that ultimately seems to be a two-layer 2D Bin-Packing-Problem, but I'm having trouble drafting out a high-level approach because of the ...
1
vote
0answers
32 views

Sorting arrays by a string contained in it (PHP)

I want to learn PHP. In order to do that, I'm trying to code in it. Right now I am struggling with sorting arrays. I'm using scandir to look for contents of my log folder. I have multiple .log files ...
1
vote
0answers
11 views

How to sort by fetched properties with distinct JPA Specifications

I use Spring Boot 1.5.3.RELEASE and for me it's unclear how to sort by properties of nested objects with distinct and Specifications because of: Caused by: org.postgresql.util.PSQLException: ERROR: ...
-1
votes
1answer
59 views

When I run this code on VScode, it shows “test.c has stopped working”. I was trying to Practice merge sort

C/C++ I'm using VScode. When I run this program file stopped immediately. I have encountered this kind of problem before. but it happened because I scanned an array without '&' addressing it. but ...
-1
votes
0answers
24 views

JS/ReactJS: Sorting an array in time

I want to make an application which would render upcoming events. I use ReactJS. App.js fetches an array of objects from a database. This array is an array of event objects. These are the elements ...
0
votes
1answer
27 views

Unique ordered ratio of integers

I have two ordered lists of consecutive integers m=0, 1, ... M and n=0, 1, 2, ... N. Each value of m has a probability pm, and each value of n has a probability pn. I am trying to find the ordered ...
0
votes
0answers
4 views

How to sort the hours under the same date Odoo 14

I am using odoo 14 and i want to sort hours(desc) withing datetime(desc). i am using _order = 'start_datetime desc, unit_amount desc' by this date is work but hours not working desc within this ...
-3
votes
0answers
17 views

How to get part of dict using a date condition? [closed]

I have a dict where each key stores a datetime object. I would like to create a function that receives the dict and 2 dates, and returns a new dict containing all the values that are between those 2 ...
0
votes
0answers
19 views

How to add sorting and duplicate removal functionalities to the following Ocaml function?

I am trying to create an Ocaml function that takes a nested list, and returns a list containing the union of the element lists. For example, given [[3;1;3]; [4]; [1;2;3]], the function should return [...
0
votes
0answers
7 views

Snapshot Database Sorting

So we have a created a snapshot database (AgricultureMain_SS mainly used by our reports in SSRS. What we've noticed is when we select/execute a stored procedure from snapshot database vs. from the ...
-6
votes
0answers
31 views

Java with Algorithms [closed]

I am working with JAVA. I am trying to design and implement an algorithm which will take the array from user and calls multiple sorting algorithms (Quick sort, Merge Sort, Bubble sort). I have write ...
0
votes
0answers
34 views

What algorithm can I use to chose which order I visit the edges of a graph to minimize the number of cache misses?

Big Picture I'm writing some code to simulate a computer at the transistor level. The emulator boils down to a graph where each node is a transistor, and each edge is a wire connecting any two ...
0
votes
1answer
13 views

React 'TypeError: items is not iterable'

I'm trying to implement this table-sorting solution into an application I am working on. Here is the working codesandbox with the sorting feature I am trying to implement: https://codesandbox.io/s/...
-3
votes
0answers
25 views

How do I Sum values of arraylist with hashmap by category?

I can't figure it out. I have a hashmap Class: import java.util.HashMap; public class MiestasHM { private HashMap<String, Integer> map = new HashMap<>(); public HashMap<String,...
-2
votes
2answers
37 views

Python - sort strings / numeric

My problem, I would like to sort the below list (using Python) my_list = ['2', '1', '1+', '1-', '2+', '2-'] into my_list = ['1+', '1', '1-', '2+', '2', '2-'] Edit: I tried sorted which gives me ['1', '...

15 30 50 per page
1
2 3 4 5
4498
 
久草视频新免费_日韩视频一中文字暮_欧美三级片