Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
0 answers
111 views

I am implementing Red-Black Tree deletion (CLRS-style). I understand the general delete logic, but I am confused about this specific line: if (y->parent == z) { if (x) x->parent = y; } ...
1 vote
1 answer
88 views

I am working on a real-world navigation problem where a city road network is represented as a weighted graph (distances in kilometers). The goal is to compute the shortest path from North Nazimabad to ...
-4 votes
1 answer
96 views

I am working on a real-world navigation problem where a city road network is represented as a weighted graph (distances in kilometers). The task is to compute the shortest path from North Nazimabad (...
-2 votes
0 answers
124 views

Code 1 In code one we are using the binary exponentiation. public class Solution { public int pow(int A, int B, int C) { if (C == 1) return 0; long base = (A % C + C) % C; ...
3 votes
1 answer
143 views

I’m currently learning about data structures and algorithms (DSA) by reading the book "Learning JavaScript Data Structures and Algorithms – 2nd Edition" by Loiane Groner. I am implementing the DSAs in ...
2 votes
1 answer
114 views

I am a student studying graph algorithms and learning topological sorting of a Directed Acyclic Graph (DAG). The topological_sort function below is provided in our textbook, and I am not allowed to ...
Advice
1 vote
4 replies
184 views

I want to learn Data Structures, Algorithms, and Big-O notation from scratch, but there are too many resources online and it’s difficult to determine which ones are trustworthy or widely used by ...
-2 votes
1 answer
78 views

Something called reversed() on an instance of a class of mine, which resulted in the error TypeError: 'HBox' object is not reversible What does it mean for an object to be reversible?
1 vote
1 answer
81 views

I’m studying red–black trees (CLRS style) and I’m confused about how black-height behaves during RB-INSERT-FIXUP. I quote here that procedure from CLRS: RB-INSERT-FIXUP(T, z) while z.p.color == ...
0 votes
1 answer
103 views

I'm working on a small DSA practice problem involving frequency counting, but with a twist. I have a list of tuples where each tuple represents a (category, item). Example: data = [ ("fruit&...
Ridit's user avatar
  • 23
Advice
0 votes
1 replies
43 views

I'm trying to model a generic "capability" or "permission" structure. The part I'm having trouble with is finding the name of the specific data structure. It's not a formal tree, ...
1 vote
1 answer
221 views

I'm interesting in possible implementation approaches for a quite special variant of a list, with the following requirements: Efficient inverse lookup ("index of"): "give me an index ...
0 votes
2 answers
167 views

I have a folder containing huge numbers of files in many subfolders, and I want to select the files with a name that matches any of a specified list of patterns (regular expressions). My regular ...
-3 votes
1 answer
196 views

The algorithm I've written for an assignment is closely related to this monotonic stack approach https://www.geeksforgeeks.org/dsa/next-greater-element/ Best case: n pushes → Time complexity: O(n) ...
Advice
1 vote
1 replies
43 views

I understand the standard explanation for why B-trees are used in databases: they minimize disk seeks by packing many keys into each node, keeping the tree shallow (3-4 levels), and enabling efficient ...

15 30 50 per page
1
2 3 4 5
...
2274

AltStyle によって変換されたページ (->オリジナル) /