Count Good Nodes in Binary Tree - Kotlin (Medium)Given a binary tree root, a node X in the tree is named good if in the path from root to X there are no nodes with a value greater than X. Return the number of good nodes in the binary tree. Example 1: Input: root = [3,1,4,3,null,1,5] Output: 4 Exp...Feb 19, 2022·1 min read
Linked List Implementation In Kotlin -Data Structure And AlgorithmsA Linked List is a common data structure made of a chain of nodes in which each Node contains a value and a pointer to the next node in the chain. The head pointer points to the first node and the last element of the first node and last element of th...Jan 15, 2022·3 min read