All Questions
Tagged with binary-tree binary-search-tree
5 questions
2
votes
3
answers
150
views
Maximum Sum BST in a Binary Tree
I was trying to find the Maximum sum BST of a binary tree on LeetCode. While the Java code I have come up with, mostly seems right and is able to pass 55 out of the given 59 test cases too, the error ...
2
votes
1
answer
89
views
Sort array of numbers using tree sort - Leetcode 912
Problem statement:
Sort integer array nums in O(N log N) time,
without relying on any library sort routine.
I am trying to use a tree sort method (using the ...
4
votes
2
answers
130
views
Delete a node in binary tree
Problem Statement
Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST.
Basically, the deletion ...
3
votes
1
answer
114
views
AVL Tree in C Criticism
I have made an AVL tree in C and coded the basic functionality of insertion, deletion, and search. I would love some criticism on my implementation especially on the insertion and deletion section of ...
3
votes
2
answers
496
views
C word frequency counter
I write this program based on the algorithm of the word frequency counter program on the K&R book, page 139. I added some idioms of mine, some command-line options, and a dynamically allocable ...