Skip to main content
0 votes
0 answers
31 views

I have been following the Cormen algorithm for RB trees, but I have a question regarding deletion, specially in this case: 38 31 41 all the nodes are black and I want to delete 38. After ...
Little's user avatar
  • 3,477
0 votes
0 answers
57 views

I am making a drawing application and i have to show the borders of the pencil. To know where to place the pixels I use a list of integer offsets from the cursor that make up a shape, so the cursor is ...
Gabbinetto's user avatar
-4 votes
1 answer
142 views

I understand the idea of the insertion sorting algorithm, and I know how it works after watching many videos and doing research. However, I had never seen any code for it, so I tried to code it myself....
Faris Alakassi20's user avatar
Tooling
0 votes
12 replies
98 views

I'm working on a project in which I need to filter out specific strings from an inconsistent API, where the strings are not always what I want. I need to filter out eligibility for different education ...
23emli's user avatar
  • 1
Advice
2 votes
3 replies
47 views

0-1 Knapsack problem is often used as a starting problem to understand dynamic programming. This problem can also be solved using backtracking. Now, backtracking explores all possible subsets and uses ...
Hades's user avatar
  • 11
Best practices
2 votes
15 replies
141 views

General question I wonder how to express any code of the form while True: state_before = some_function(my_object) # algorithmic code goes here state_after = some_function(...
flonk's user avatar
  • 3,916
Advice
0 votes
2 replies
37 views

i am learning about big o notation and need a little bit of clarity before i diverge into the wrong path. my understanding is o() is suppose to represent the time it takes for a program to do a task ...
booboobearboy283's user avatar
Advice
0 votes
5 replies
53 views

As the title says, how can i convert a value that i have from a longitude or latitude from degrees to meters ? The task is basically to calculate MAE errors for x,y,z of trajectory prediction, MAE Z ...
Destr's user avatar
  • 1
Advice
2 votes
10 replies
55 views

I have a 3d scan of a metal pipe and I can slice it at different heights. When looking at a cross-section of a new pipe, the data should match the shape of a perfect circle, but due to erosion the ...
G-Man's user avatar
  • 1
Advice
6 votes
12 replies
123 views

I need a fast algorithm to compute fixed-point euclidean distance in 3D. I'm really struggling to find a fast solution. I am working on a 32-bit RISC-V processor where I have fast multiply, but no ...
Charles Lohr's user avatar
  • 1,030
1 vote
1 answer
130 views

I'll be questioning about a drawing program - flash 8 and how its brush worked. The question is about math, bezier curves, vectors, algoritms, geometry. i'm trying to recreate how Flash 8's brush tool ...
xXxAirSnifferxXx's user avatar
Best practices
4 votes
5 replies
98 views

I have an array of arrays which are not necessary of the same size which I want to combine in the following way. Each nested array is scanned in the order they appear in the main array. The scanned ...
Aristide's user avatar
Best practices
2 votes
2 replies
46 views

I’m building a chatbot using Python, pydantic_ai, google_genai, and the gemini‑2.0‑flash‑lite model. The bot includes a module responsible for retrieving context from a knowledge base (RAG). The ...
Przemysław Ozga's user avatar
3 votes
1 answer
465 views

This is a simple question, but will be a little long so I can give all the context to what is happening. Essentially, this is a code question/issue and the physical context behind is just to ...
Silvio sjsj's user avatar
Advice
0 votes
7 replies
99 views

I’m looking to understand both: A brute force solution An optimal solution (in terms of time and space complexity) The input is a slice of integers, for example: nums := []int{10, 5, 20, 8, 15} ...
Jamil Noyda's user avatar
  • 3,677

15 30 50 per page
1
2 3 4 5
8100