Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
1 vote
2 answers
87 views

I have a graph: undirected, unweighted, no leaves, no disconnected edges or vertices. The graph is populated with vertices of 3 types: A, B, C. Let's say, I hold a vertex of type A, denoted as A0. I ...
BorisV's user avatar
  • 119
-4 votes
2 answers
247 views

I'm working on implementing parsing a series of Uint8Arrays that contain Transfer-Encoding: chunked data sent from the client using WHATWG Fetch over a single connection. For example, writing 1 MB ...
guest271314's user avatar
0 votes
1 answer
158 views

I have an excel macro that imports daily share price files, and finds the highest price for a share after a given date. Each of these daily stock price files has ~1000 rows of data. Currently I have ...
Frankie139's user avatar
1 vote
1 answer
232 views

Given a line in a 2d coordinate system, we can create a dependency graph like this: The black nodes represent a logical graph that is a-cyclic and therefore "stable" in the sense that if we ...
NWoodsman's user avatar
  • 195
-2 votes
3 answers
354 views

Backstory: Writing a QImage to Sixel renderer. Feel like I have optimized it the best I can using basic c++. I have heard suggestions here or there that you can utilize things like GPU, SIMD, insert ...
Anon's user avatar
  • 3,649
1 vote
1 answer
152 views

Problem Match prioritized tasks with suitable workers. Details Consider a task with following properties - type and size. Based on task type, tasks are prioritized. While a worker has following ...
Ammar's user avatar
  • 123
1 vote
1 answer
192 views

I am looking for a data structure and an algorithm to manage a dynamic collection of strings, but grouping strings that have a substring in common. I try to describe it through an example. @Christophe:...
differentrain's user avatar
0 votes
2 answers
429 views

I'm trying to make a curved line move relative to the movement of a straight line. I'm thinking that I want the points on the curved line to keep their relative positions to the two points on the ...
Dan Anderson's user avatar
-2 votes
1 answer
204 views

I back up important paths from my PC each day with an automated process that creates zip files. On the 20 terabyte drive I can have close to three years worth. Each weekend I make a VHDX backup of my ...
subjectivist's user avatar
-1 votes
2 answers
106 views

I've been working on a software project recently that's meant to include an audio player, and my plans for it definitely are to simply use an off-the-shelf player library, and go with that. However, ...
Daneolog's user avatar
  • 107
0 votes
0 answers
80 views

I have an image that has been converted to an svg. The conversion looks fine, but it has prefered to use fill instead of stroke. This in itself is not a bad thing in terms of converting a raster image ...
munHunger's user avatar
  • 138
-1 votes
2 answers
146 views

I have a time-series database where I put all my data in it in timely-ordered fashion. Unfortunately, the database doesn't have any realtime listener capability built into it, and I need to make an ...
Riki Syahputra's user avatar
0 votes
3 answers
197 views

Im am developing a logistics application and at the moment, I try to solve the following problem: In the system, there are multiple machines. Each machine has one or more skills. For example, machine ...
pschill's user avatar
  • 2,040
2 votes
2 answers
589 views

I have an algorithm I am trying to implement that has steps 1 to 5. There are several different ways I could implement each step. Each calculation step is essentially just an astronomy calculation, ...
Hunter's user avatar
  • 187
2 votes
1 answer
728 views

I'm looking for a way in C# that finds all the possible combinations with constraints. I've got a list of machines. The machines have capabilities and limitations. I also have a document that defines ...
xtreampb's user avatar
  • 166
1 vote
3 answers
255 views

Merge Sort contains basically two important routines: (i) split (ii) merge. I get the general idea. But I dont understand how this is more efficient than some random bad sort algorithm, like selection ...
digoalbuq2's user avatar
5 votes
9 answers
3k views

I have been working on launching high-altitude balloons (HABs, or weather balloons) and I have been using LoRa to enable long-range communication with my balloons. It's been great and pretty reliable, ...
Lv_InSaNe_vL's user avatar
0 votes
0 answers
100 views

Wikipedia says "increase key" is O(log n) for a binary heap, but it is referring to an internal function. I'm not asking about that: Imagine the data structure had an external/public ...
Daniel Kaplan's user avatar
0 votes
1 answer
231 views

I am currently developing an application in Python that has a match making functionality to form sports teams of 4 and group them by skill. The following has been implemented and works. E.g. Form ...
serge's user avatar
  • 9
0 votes
1 answer
110 views

I found this Python code implementing Double Metaphone, and it basically has a bunch of if statements handling each letter, though I'm not exactly sure the decisions that went into each branch yet. ...
Lance Pollard's user avatar
11 votes
4 answers
8k views

I am interested to know if there is an existing algorithm to start a multiplayer game, for example, poker. What steps do we need to take when the player enters the "matchmaking phase"? I ...
AM13's user avatar
  • 237
1 vote
2 answers
483 views

I'm working on a module that handles colormaps and I want to make the mapping of pixel to colors as efficient as possible. It is a performance critical section of our app. Our current solution works ...
glades's user avatar
  • 493
1 vote
2 answers
177 views

I'm working on a small project and I'm randomly generating "world maps", with nodes you can fast travel to along given routes. The basics of this aren't complicated; throw random points on a ...
ConnieMnemonic's user avatar
1 vote
3 answers
489 views

The issue that I'm facing is on a banking app. There are two ways to register for internet banking. A) Self Register B) Ask for bank to register via their GUI panel backend. Consider this scenario: ...
tuck_y's user avatar
  • 191
3 votes
2 answers
294 views

I'm working on a component that needs to draw chart-like structures like this: One issue I have is when multiple values are too close with each other. Here's an illustration: The last values for the ...
Arseni Mourzenko's user avatar
-1 votes
4 answers
737 views

On day 1, one person discovers a secret. You are given an integer delay, which means that each person will share the secret with a new person every day, starting from delay days after discovering the ...
jason's user avatar
  • 15
2 votes
3 answers
160 views

I'm trying to implement LOGO with a physical turtle. I got all the basics done, but I got completely sunk when implementing the "Window" mode. Original LOGO had 3 modes: "Border" - ...
SF.'s user avatar
  • 5,236
1 vote
0 answers
146 views

I'm trying to solve the following problems here: In the X world, companies have a hierarchical structure to form a large binary tree network (can be assumed to be a perfect binary tree). Thus every ...
driver's user avatar
  • 111
3 votes
1 answer
508 views

In relation to another question I had, I have been researching Simulated Annealing. The general example used with this algorithm is the traveling salesman example. I have been testing the code ...
wforl's user avatar
  • 159
1 vote
3 answers
250 views

Given a graph layout like the following image, where the layers/rows (y coordinate) and ordering of nodes within each layer have already been computed, what algorithm can I use to make it look "...
wforl's user avatar
  • 159
-1 votes
1 answer
187 views

I'm making a piece of software that is able to recognize Magic the Gathering Cards from a picture or the actual camera. The codebase scans for rectangular shapes (cards) in an image and calculates ...
Martin's user avatar
  • 21
-3 votes
3 answers
212 views

In the Netflix series Suits, Season 1, Episode 8 (Identity Crisis), the legal team, with the help of a hacker, is tasked with proving that a business magnate embezzled funds, splitting them and ...
Cade Bryant's user avatar
-3 votes
1 answer
299 views

Problem statement: You are given an array of strings. Each element (string) of array is of size 2. You are supposed to find the length of shortest possible string such that every element of the array ...
letitbesb's user avatar
6 votes
7 answers
7k views

For example, I have an object: public class Obj{ public int a; public float b; public String c; } I need to find best "Obj": largest a and then largest b and then longest c: int ...
wcminipgasker2023's user avatar
0 votes
3 answers
951 views

So I have this problem where a specific ValuesA enum value is to be mapped to a respective ValuesB enum value, The trick is there can be multiple ValuesA mapping to a single ValuesB enum. So for the ...
xyf's user avatar
  • 109
0 votes
1 answer
129 views

I recently started trying to implement a monte carlo tree search based algorithm for playing cops and robber. The game is based on the cops and robber game and is played on an arbitrary graph (not ...
Raoul Luqué's user avatar
0 votes
1 answer
131 views

I am looking to see if there is a general design pattern or strategy to handle a use case I see often in our codebases. My best attempt to generalize this use case is "Map permutations of n ...
jason.zissman's user avatar
3 votes
1 answer
320 views

I'm doing a running time analysis using the aggregate method and I'm a bit confused about what would be the result in this case. I have some intuition in inferring that it would be O(mlog(n)) but I'm ...
neo's user avatar
  • 51
-1 votes
2 answers
581 views

Based on the data structure of the AVL tree, I implemented a memory manager that does the best matching according to the size. I originally thought that the speed would be fast and the length of the ...
CukiPid's user avatar
  • 11
3 votes
2 answers
370 views

I am working on a class design question - design a simple grocery store with a self-checkout system I am a beginner After briefly jotting down requirements, I started with the Product class as follows ...
darklion's user avatar
1 vote
1 answer
217 views

I have an algorithm that runs a search through every combination of a 5x5 grid where each cell can have 3 values, looking to see which combinations meet certain conditions. This gives 3^25 naive ...
Jason C's user avatar
  • 465
2 votes
2 answers
586 views

I’m currently tackling a programming challenge to schedule a series of “performances” (a set of dancers together on a stage for a period of time, concretely) that each involve a set of “participants” (...
Daniel Rozeboom's user avatar
30 votes
7 answers
17k views

If all data is essentially just a bit string, then all data can be represented as a number. Because a compression algorithm, c(x), must reduce or keep the same length of the input, then the compressed ...
Mercury's user avatar
  • 475
0 votes
1 answer
105 views

I need to generate grid shells for a given level. For example, the 2d grid "shell" at level 0 is just the cell (0,0). The level 1 shell would be every cell surrounding (0,0), the level 2 ...
xytor's user avatar
  • 111
2 votes
1 answer
187 views

First of all, I am serious :) You have array of N elements and we can compare them (e.g. operator > works). Let's try to (unstable) sort it using following brand new sorting algorithm. First, ...
Nick's user avatar
  • 305
1 vote
4 answers
369 views

I am currently looking for a way to encode a list of random numbers most efficently (as in length). To be specific, I have an array of 11 numbers containing each number from 0 to 10. The order will be ...
DK13's user avatar
  • 29
0 votes
1 answer
215 views

I have the code but I want to be pseudo as possible so I learn from other ways as much as possible. So what I am building is web based tool and in one section we have a table. This table renders lines ...
Codemenot's user avatar
1 vote
1 answer
130 views

I'm trying to understand why anyone would prefer Floyd-Warshal over Dijkstra: Dijkstra gives a correct result, using an understandable system, combined with backtracking. Floyd-Warshal makes an ...
Dominique's user avatar
  • 1,844
0 votes
1 answer
160 views

I've got this class: [UsedImplicitly] public class ClassicalKeplerian { public ClassicalKeplerian(Angle argumentOfPeriapsis, Angle inclination, UnitFraction eccentricity, Angle ...
ScottishTapWater's user avatar
1 vote
3 answers
239 views

Note: This question is not about this particular instance of this grid with these exact words, but about any combination of words. I am programming a puzzle game where you have to arrange a grid of ...
Florian Walther's user avatar

1
2 3 4 5
45