Skip to main content

Questions tagged [algorithm]

An algorithm is a sequence of well-defined steps that defines an abstract solution to a problem. Use this tag when your issue is related to algorithm design.

0 votes
0 answers
10 views

Calculating a list of voxels within multiple overlapping Axis-Aligned-Bounding-Boxes, without looping over the same space

I have a method that returns a list of voxel coordinates within an AABB. Let's say a voxel is 1x1x1 cm, and a bounding box is 2x2x2, then it will return 8 voxels by looping over the dimensions of the ...
Melvin Brink's user avatar
1 vote
0 answers
23 views

In-Place Reordering of Doubly Linked List Nodes to Ensure Memory Contiguity

I am working on a program that deals with doubly linked lists that are allocated within a bounded memory region: constexpr std::size_t numNodes = 15; Node* block = new Node[numNodes]; I would like to ...
Jonathon Halim's user avatar
0 votes
0 answers
11 views

Modified accel asc algorithm

I wanted to make an accel asc algorithm that only outputs partitions that only have terms that are smaller than or equal to n. For example: if I want the partitions of 4, and n = 2, the wanted ...
bborxx's user avatar
  • 1
1 vote
2 answers
59 views

Parse every k-element subset of an n-element vector

My goal is to perform an operation on every k-element subset of n elements stored in a vec. My current approach uses this bit-manipulation to generate integers with k set bits in lexicographic order. ...
Dave's user avatar
  • 8,976
2 votes
1 answer
57 views

Having issues calculating APSP for matrix size n >= 4

I'm having issues finding the problem with the following implementation of Floyd-Warshall APSP Algorithm. Currently working on a vjudge exercise and I'm having issues figuring out what's the problem ...
str8's user avatar
  • 23
0 votes
0 answers
19 views

trilateration algorithm for calculation of real time location (flutter app) (BLE beacons used)

I am trying to implement a real-time location system in which I can upload a map (image) and pinpoint certain things such as the location of beacons, destination, and so on. I am trying to calculate ...
Meiirzhan Baitangatov's user avatar
0 votes
0 answers
51 views

How to determine if a node in graph is connected to another node efficiently? [closed]

Now I know some people will suggest DFS or BFS etc etc, but I am looking for other faster approaches. The graph I'm working on has "mixed" directions - some edges are directed but some aren'...
UndefinedCpp's user avatar
0 votes
0 answers
19 views

DGE Analysis using Limma on DSP GeoMx Data: Handling Multiple ROIs per Core

I am performing differential expression analysis using the limma package on DSP GeoMx data, and I have a question regarding the handling of multiple ROIs per core. Below is a snippet of my sample ...
nicholaspooran's user avatar
1 vote
2 answers
37 views

Fast way of detecting outliers in 2D space

I have hundreds of millions of point clouds like the following: I want to remove outliers 1, 2, 4, 5, 6, 7. The safest bet is to build a minimum spanning tree connecting all the points and remove ...
user2961927's user avatar
  • 1,654
-1 votes
0 answers
18 views

How to create an algorithm with melody and chords as input, and tight parallel 3 part harmony as output [closed]

After not finding the app I'm looking for and speaking to a friend who programs: I'm looking to develop algorithmic rules which can be used to program an app such that you input a melody and ...
gregorio's user avatar
0 votes
2 answers
104 views

Finding minimum value in given range efficiently

I have function that takes a number n that represents number of servers and another parameter represents a list of requests Initially servers will hold values 0 of size n. For each request, requests[i]...
Sid's user avatar
  • 79
0 votes
1 answer
45 views

Algorithm help: given n sets of integers and a target integer, find a set of one element from each set that adds to the target integer

I have multiple sets of integers, let's call them K_1 through K_N. Each set is finite and not necessarily the same size. I have a target integer, C. Is there a way to select one element from each ...
Sam's user avatar
  • 3
0 votes
1 answer
37 views

Checking a candidate majority element: Does my simplification work with all cases?

Here are the details of the problem: Given a sorted array arr of N elements. A majority element in an array of size N is an element that appears more than N/2 times. The task is to write a function ...
Gargouri Nourallah's user avatar
-1 votes
0 answers
76 views

How to explain the logic of the pairing of the 2018 FIDE World Chess Candidates Tournament? [closed]

Update-2 This is indeed a standard ‘circle’ schedule with players renumbered from 1:7 to ‘2’, ‘8’, ‘4’, ‘5’, ‘3’, ‘6’, ‘1’. Rounds 6 and 7 are swapped. To reproduce: # ---------------------------------...
clp's user avatar
  • 1,448
2 votes
2 answers
64 views

Finding the subarray with the least median given a size K and an array of length N

I have been struggling the past month with this problem that was given to us on our course while I was upsolving it. The task is to find the window of size K with the least median in an array of ...
Lesserrafim's user avatar

15 30 50 per page
1
2 3 4 5
8070