tag:blogger.com,1999:blog-1754407834622405880.post6695931264748277016..comments2023-11-02T01:21:27.131-07:00Comments on Exceptional Code: A Binary Search Trees TutorialGolam Kawsarhttp://www.blogger.com/profile/07551677609426133341noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-1754407834622405880.post-18757092924524933322016-11-04T02:55:12.576-07:002016-11-04T02:55:12.576-07:00you have a mistake in delete operation. I think it...you have a mistake in delete operation. I think it should be like this <br />the parent's child should be assigned to null<br /><br /> // Case 1: node does not have a child, just delete it<br /> if (node.getLeft() == null && node.getRight() == null)<br /> {<br /> if (node.getParent() != null && node.getParent().getLeft() == node)<br /> node.getParent().setLeft(null);<br /> else if (node.getParent() != null && node.getParent().getRight() == node)<br /> node.getParent().setRight(null); <br /> }Sami al-Fattani Ahttps://www.blogger.com/profile/03176756552948951112noreply@blogger.comtag:blogger.com,1999:blog-1754407834622405880.post-75607670669631511802016-02-02T11:03:57.871-08:002016-02-02T11:03:57.871-08:00C# Code for InOrder Successor (without using Paren...C# Code for InOrder Successor (without using Parent Ref) : http://ideone.com/xCcCQ7Amit Guptahttps://www.blogger.com/profile/03121333817800114093noreply@blogger.comtag:blogger.com,1999:blog-1754407834622405880.post-54684090592064508342016-01-12T05:29:21.714-08:002016-01-12T05:29:21.714-08:00if bst is 5,2,1,4,3,8,7 then your predecessor() is...if bst is 5,2,1,4,3,8,7 then your predecessor() is not working correctly if we try to find the predecessor of 3...<br />just check it ......Ankush Chaudharyhttps://www.blogger.com/profile/05857550874878197606noreply@blogger.comtag:blogger.com,1999:blog-1754407834622405880.post-15887890551991210782011-08-18T17:25:29.661-07:002011-08-18T17:25:29.661-07:00OK, will try to add those two (creating BST out of...OK, will try to add those two (creating BST out of any binary tree and about balancing BSTs) sometime in the future!<br /><br />Thanks for taking time to read it:)Golam Kawsarhttps://www.blogger.com/profile/07551677609426133341noreply@blogger.comtag:blogger.com,1999:blog-1754407834622405880.post-84052590338158734422011-08-18T01:10:53.839-07:002011-08-18T01:10:53.839-07:00Great article, I'd add extension to it, first,...Great article, I'd add extension to it, first, about creating BST out of any binary tree and about balancing BSTs, than it'll be the extra exceptional code (Unhandled exception: Info about this comment could not be read :))Unknownhttps://www.blogger.com/profile/14533773782083414881noreply@blogger.comtag:blogger.com,1999:blog-1754407834622405880.post-83584200248278530032011-08-18T00:50:43.274-07:002011-08-18T00:50:43.274-07:00This comment has been removed by the author.Unknownhttps://www.blogger.com/profile/14533773782083414881noreply@blogger.com