## Postorder Tree Traversal

Given a binary tree, return the post-order traversal of its nodes’ values. For traversing a binary tree in post-order fashion, we must do these three things for every node N

## Preorder Tree Traversal

Given a binary tree, return the pre-order traversal of its nodes’ values. For traversing a binary tree in pre-order fashion, we must do these three things for every node N

## Inorder Tree Traversal

Given a binary tree, return the inorder traversal of its nodes’ values. For traversing a binary tree in in-order fashion, we must do these three things for every node N

## Check if Binary trees are Symmetric or Not

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).Return 0 / 1 ( 0 for false, 1 for true ) for this

## How to check if two Trees are Identical or Not?

Given two binary trees, write a function to check if they are equal or not. “Two binary trees are considered equal if they are structurally identical and the nodes have

## LeetCode – Two Sum IV – Input is a BST

Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given target. Example

## LeetCode – Validate IP Address

Write a function to check whether an input string is a valid IPv4 address or IPv6 address or neither. IPv4 addresses are canonically represented in dot-decimal notation, which consists of

## Scala Functions

Overview Scala supports functional programming approach. It provides rich set of built-in functions and allows you to create user defined functions also. In scala, functions are first class values. You

## Pattern matching in Scala

Overview Pattern matching is a mechanism for checking a value against a pattern. It is a more powerful version of the switch statement in Java and it can likewise be

## How to Define Trait in Scala

Overview In this article you will learn how to construct reusable parts of a program and deal with the tribulations of multiple inheritance. A trait provides code reusability in Scala

## Basics of Scala

This tour contains bite-sized introductions to the basics syntax of Scala. It is intended for newcomers to the language. Values You can name results of expressions with the val keyword.

What is Scala? Scala is a modern multi-paradigm programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and

## Exception Handling in RESTful Web Services with Jersey

Exception handling in RESTful web services (JAX-RS) is a very important concept, in this article we are going to explain it step by step with an example. check this article

## Difference between Array and ArrayList

1. Size Array is fixed size datastructure where ArrayList is dynamic size datastructure. We need to provide size of Array during creation of Array Object, Where ArrayList no need to

## Difference between Abstract Class and Interface

1. Definition of Abstract Class and Interface An abstract class is a special kind of class that cannot be instantiated. An abstract class is only to be sub-classed (inherited from).

## Difference between GET and POST

1. Overview A web browser communicates with the server typically using one of the two HTTP (Hypertext Transfer Protocol) methods — GET and POST. 2. Definition of GET and POST

## Difference between JSP and Servlets

Definition JSP is a webpage scripting language that can generate dynamic content. Servlets are Java programs that are already compiled which also creates dynamic web content. Speed JSP run slower

Definition It means having methods of the same class under the same name, but each method has different parameters or has same parameters with different types and order. It means

## Difference between Throw and Throws

1. Use of Throw and Throws Throw keyword is used to throw an exception explicitly. Throws clause is used to declare an exception, which means it works similar to the

## Difference between ArrayList and Vector

1. Synchronization ArrayList is not Synchronized, That means multiple Threads can work on ArrayList Object at a same time. For e.g. if one thread is performing an add operation on

## Difference between Setter Injection and Constructor Injection

Partial dependency In Setter Injection, partial injection of dependencies can possible, means if we have 3 dependencies like int, string, long, then its not necessary to inject all values if

## JSP Interview Questions and Answers

What is JSP? JSP stands for Java Server Pages, it is a server side technology which is used for creating dynamic web pages. It is the extension of servlets. It’s

## JDBC Interview Questions and Answers

What is JDBC? Why we use JDBC? JDBC is a Java API that is used to connect and execute query to the database. JDBC API uses jdbc drivers to connects

## Towers Of Hanoi Algorithm

Towers Of Hanoi Algorithm The towers of hanoi is a mathematical puzzle. We have three towers (or rods or pegs), and a number of disks of different sizes which can

## Spring IoC Container

The Spring container is at the core of the Spring Framework. The container will create the objects, wire them together, configure them, and manage their complete life cycle from creation

## Dependency Injection in Spring

Dependency Injection (DI) is a design pattern that removes the dependency from the programming code so that it can be easy to manage and test the application. Dependency Injection makes