# DSA

## Difference between Binary Tree and Binary Search Tree

In this article, we will look at the difference between Binary Tree and Binary Search Tree. These topics are very important because these act as an underlying data structure for various other data structures. So, we will look at the description of each with examples and compare their properties. Binary Tree A Binary tree is …

## Kadane’s Algorithm (Maximum Sum Subarray Problem) in Java

In this article, we will understand the idea of Kadane’s Algorithm. We discuss this with the help of an example and also discuss a famous interview problem related to it. Then, we will look at the implementation and analyze the complexities of our approach. Kadane’s Algorithm This algorithm is useful in solving the famous ‘Maximum …

## Invert a Binary Tree – Recursive and Iterative Approach in Java

In this article we have a look at another interesting problem related to binary tree. Given a binary tree we have to invert the tree and print it. We discuss different approaches to solve this problem along with their time and space complexities The inversion of a binary tree or the invert of a binary …

## LRU Cache – Design and Implementation in Java

In this article we will learn how to design a LRU Cache, understand it’s cache replacement algorithm. We also look at description of LRU Cache with some examples. Then, we look at the implementation of this design in code with their complexity analysis. Caching is a method of organizing data in a faster memory, usually …

## Bottom View of Binary Tree in Java

In this article, we see how to print the bottom view of Binary Tree. We discuss our approach to solve this problem and analyze the time and space complexities. It is recommended to first learn Top View Of Binary Tree before proceeding with this problem. A lot of the implementation is based on the Top …

## Top View of Binary Tree in Java

Given a binary tree we have to print top view. We will discuss our approach to solve this problem along with its implementation and code in Java language. We will also analyze the time and space complexity of our implementation. The top view of binary tree means the set of nodes visible when the tree …

## Left View of Binary Tree in Java

In this article, we look into a problem related to binary tree. Given a binary tree, we have to print its Left View. We will see the different methods to solve this problem with their implementations in java. Along with this, we will also look into the time and space complexities of our methods. By …

## Right View of Binary Tree in Java

In this article we look into another problem related to binary trees. Given a binary tree we have to print the Right View. We will discuss the approaches to solve this problem with their implementations and code. Along with this we will also look into the time and space complexities of our approaches. By right …