Java Program Print BST keys in the given range - Binary Search Tree - Given two values k1 and k2 (where k1 < k2) and a root pointer to a Binary Search Tree.
Category - JAVA
A trick in step 2.b is to use memorization ( Dynamic programming ) while finding number of employees under a manager so that we don’t need to find number.
We can also use hashing to avoid building a graph. The idea is to first find the starting point. A starting point would never be on ‘to’ side of a ticket.
In order Successor in Binary Search Tree - Binary Search Tree - In order successor of a node is the next node in In order traversal of the Binary Tree.
Java Algorithm - Write a program function to detect loop in a linked list - Linked List - Given a linked list, check if the the linked list has loop or not.
Java Programming - LinkedList in java - Linked List - In Java, LinkedList class implements the list interface.This class consists of the following
Given an unsorted array that may contain duplicates. Also given a number k which is smaller than size of array. Write a function that returns true
Time Complexity: Depends on what sorting algorithm we use. If we use Merge Sort or Heap Sort then (-)(nlogn) in worst case.
Java Algorithm - Write a function to reverse a linked list - Linked List - Given pointer to the head node of a linked list, the task is to reverse
Java Algorithm - Next Greater Element - Stack - Given an array, print the Next Greater Element (NGE) for every element. The Next greater