Skip to main content
0 votes
0 answers
110 views

Table has index on name column: CREATE TABLE firma2.klient ( kood character(12) primary key, nimi character(100), ... ); CREATE INDEX IF NOT EXISTS ...
Andrus's user avatar
  • 28.2k
5 votes
3 answers
223 views

I implemented a recursive solution in Python to check if two binary trees are identical, which traverses nodes recursively and compares values and structure. The time complexity is O(n), space O(h). ...
Jared McCarthy's user avatar
0 votes
0 answers
41 views

I'm doing a programming assignment for my class. One of my programs includes creating a BST with Python within a BST class, and I'm trying to display using preorder() and inorder() functions. My ...
selena's user avatar
  • 1
6 votes
2 answers
256 views

I understand that container::lower_bound harness helpful invariant of the very container hence gives a better performance than std::lower_bound. Taking std::set::lower_bound as an example, during my ...
PkDrew's user avatar
  • 2,301
1 vote
1 answer
109 views

I'm trying to implement an algorithm for insertion into BST (binary search tree) in Rust. I did it recursively, but am having problems implementing the iterative solution. I'm struggling to borrow a ...
Robert Kusznier's user avatar
-1 votes
1 answer
73 views

I am struggling to understand the recursion going on in the insert, _insert_recursive and _inroder_traversal methods. For context, I know recursion and the concept is not strange to me, I struggle to ...
kmmensah's user avatar
0 votes
1 answer
80 views

Hello I basically need to implement a recursive function for insertion of a binary tree. I already implemented the chunk of insertion function (wether it's largest or smaller than root) but there's an ...
Cool Dude's user avatar
3 votes
1 answer
745 views

I'm having trouble implementing a threaded Binary Search Tree in C++. I have a non-threaded tree completely implemented (see below code). What I'm having difficulty with is setting the threads to ...
Boom's user avatar
  • 514
0 votes
0 answers
61 views

Explanation I'm attempting to implement a binary search tree in Rust. The problem is in the insert method, where I have a &mut Box<Node<T>> called node_to_insert_at. To insert the ...
firewuf's user avatar
  • 23
0 votes
2 answers
115 views

I'm having two issues with my code; I'd post them as two separate questions, but I believe one is causing the other. The first involves insertion; from my amateur eyes, the insert code seems to be ...
SuperDoom1 Unrevealed's user avatar
2 votes
2 answers
93 views

I've implemented a red-black tree (which is a kind of self-balancing binary search trees) with duplicated keys allowed. In the Insert method I put nodes with equal keys as right child nodes. As you ...
Maxim's user avatar
  • 2,164
0 votes
0 answers
32 views

I am working on optimizing the Delete-Max operation in an unbalanced Binary Search Tree (BST) where frequent max deletions occur. The current approach follows: Traverse to the rightmost node. Remove ...
Oshani Kaveesha's user avatar
1 vote
1 answer
62 views

I am practicing Maximum difference between node and its ancestor Java problem using my own solution which worked fine for smaller test cases. However, this is giving differnt output than expected for ...
SEJAL PITHADIA's user avatar
2 votes
1 answer
219 views

I'm trying to find a solution for this challenge: Given is n, which is the size of an array filled with ones. There are two types of operations possible on this array: Increase (x, y, m): add m to ...
Donald's user avatar
  • 31
0 votes
1 answer
107 views

I was just starting out with dynamic programming and tried solving factorial problem using the same, i used binary tree for underlying data structure, but when i thought of comparing it with normal ...
Vishwas MIshra's user avatar

15 30 50 per page
1
2 3 4 5
427