77,921 questions
3
votes
3
answers
146
views
How do I optimize my 2D Array Point Searcher
So, I decided to make an algorithm with some linear and binary search where you have a 2D array like Array [,] = {{5,2}, {0,3}, {1,2}, {3,2}} and it finds the certain subarray for example like {5,2}. ...
1
vote
0
answers
91
views
What adjustments should be made to my code to make my products sort alphabetically when multiple items have the same stock status?
I own a website that sells rare clothing products sourced from all around the country. Because no item that we buy is ever in the same condition, we create a different listing for each item with ...
0
votes
1
answer
81
views
How do I sort a Pandas DataFrame using a column name stored in a variable?
I am working with a Pandas DataFrame containing student data (GRE scores, TOEFL scores, etc.). I need to sort this DataFrame based on a specific column, but the column name is provided by the user as ...
1
vote
1
answer
76
views
Angular Material: Programmatically setting MatSort does not update UI sort arrow
I'm working with an Angular Material table (mat-table) that has sorting enabled via matSort. Sorting works perfectly when I click on the column headers (mat-sort-header).
Now, I want to trigger the ...
Advice
1
vote
8
replies
146
views
Making a palindrome out of a string of random letters (or any given value type inputs)
Found this code exercise on W3R. Been trying to figure out the relationship between the outer and inner loop (i and j), but can't seem to wrap my head around it. If anyone could walk me through this ...
4
votes
3
answers
221
views
How to sort a dictionary of word counts by value while preserving the original key order? [duplicate]
I am trying to count word frequencies in a text and then sort them in descending order of frequency. So if two words have the same frequency, they should remain in the same order they first appeared ...
Best practices
1
vote
0
replies
34
views
How to effectively implement sorting in universe basic programming language
The current version of universe programming language I working on does not cater for SORT function. For certain application , there a need read from a record file which contains over 100 items ...
0
votes
2
answers
86
views
(Shell Sorting) Applying Ciura's gap sequence (or some other optimal sequence formula)
I've been trying to teach myself various sort methods just for the sake of being able to use them in the future and right now I've been teaching myself about shell sorts. I understand the way shell ...
Tooling
0
votes
4
replies
115
views
Compare unordered lists / objects javascript
I would like to compare unordered lists / objects with an indeterminate depth in javascript like:
const t = {
key: [
{
subKey: [
{
subSubKeyOne: 1,
subSubKeyTwo:...
1
vote
0
answers
145
views
Quadratic behaviour examples generating of libc++ sort implementation
I'm studying sorting algorithms at the moment and I have one question that is actually quite well-known but still I can't find a full answer that is comprehensive enough for me. So, the topic is libc++...
Advice
0
votes
3
replies
105
views
Java : getting sorted order of Objects
I have an List of Objects that implements the Comparable Interface that I want to sort. I do not want the original List returned sorted, nor do I want an new List returned in sorted order. What I ...
Advice
0
votes
0
replies
43
views
How to show the H3 indexes order?
I would like to generate H3 grid with labels into its hexagons, following the index order and drawing its curve.
____
Note. This illustration is from another grid system, but I would like similar ...
0
votes
2
answers
182
views
Cannot get TList<>.Sort() to work in Delphi 11 FMX
I have been trying to sort a collection of objects. While I have seen many promising solutions, my compiler simply won’t accept them (error message in procedure GenReorderSpeciesList). I am using ...
0
votes
1
answer
71
views
How to filter data into another spreadsheet based on two values in the same column in google sheets
I'm making a book spreadsheet where I'd like formats to filter into a spreadsheet for physical books (Hardcover and paperback) and another for Digital books (ebooks and audiobooks). I can only seem ...
3
votes
3
answers
189
views
How do I cluster/group duplicate customer objects in my list based on email OR mobile in C#
For my current project in C#, I am tasked with fetching customer details from a data source, 'cleansing' said customers (making sure the name is capitalised correctly, mobile formatted correctly, etc.)...