What is Hashmap data structure?What is the need of Hashmap?How Hashmap data structure API works in Java?What is Hashcode?Can 2 objects have same hashcode?
This is the famous interview question for the beginners as well as for experienced, So Let's...
Home
»
Archives for September 2015
How PreparedStatement in Java prevents SQL Injection?
in
Database,
Java
- on 11:53:00
- 2 comments

What is PreparedStatement in java?Why use PreparedStatement in Java JDBC? How prepared statement prevents SQL Injection?Difference between Statement and PreparedStatement in Java?
This is the famous interview question for the beginners, So Let's see...
What is SQL Injection?
in
Database
- on 02:38:00
- 4 comments

Explain SQL Injection along with example?
This is the famous interview question for the beginners, So Let's see what it is all about.
SQL Injection is code injection technique where SQL is injected by user (as part of user input) into the back end...
Boundary Traversal of Binary Tree.
in
Algorithm,
Binary Search Tree,
Binary Tree,
Datastructure
- on 15:00:00
- No comments

Boundary Traversal of binary tree ORPrint Circumference of Binary Tree ORGiven a Binary Tree, Print its Perimeter ORPrint outside nodes of Binary Tree ORPrint Edge nodes of Binary Tree ORPrint Boundary of Binary Tree.
We have to print the boundary...
Zig Zag Traversal of Binary Tree.
in
Algorithm,
Binary Search Tree,
Binary Tree,
Datastructure
- on 12:18:00
- No comments

Level order traversal in spiral form ORPrinting a Binary Tree in Zig Zag Level-Order ORPrint a binary tree in Zig Zag way.
Given a binary tree, write a program to print nodes of the tree in spiral order. You can also say it as Spiral order traversal...
N Queens puzzle Optimized.
in
Backtracking
- on 05:12:00
- No comments

The N Queen is the problem of placing N Chess queens on an N×N chessboard so that no two queens attack each other.
Let us first understand what we want to achieve? what is the input and what will be the expected output?
You are given a chess board...
N Queens Puzzle.
in
Backtracking
- on 14:10:00
- No comments

The N Queen is the problem of placing N Chess queens on an N×N chessboard so that no two queens attack each other.
Let us first understand what we want to achieve? what is the input and what will be the expected output?
You are given a chess board...
Find the element that appears once others appears THRICE.
in
Array,
Bit Manipulation,
Java
- on 12:19:00
- No comments

Find the element that appears once others appears THRICE.
Given an array of integers. All numbers occur thrice except one number which occurs once. Find the number in O(n) time & constant extra space.
Let us first understand what we want to achieve?...
Find the element that appears once others appears TWICE.
in
Array,
Bit Manipulation,
Java
- on 04:50:00
- No comments

Find the element that appears once others appears TWICE.
Given an array of integers. All numbers occur twice except one number which occurs once. Find the number in O(n) time & constant extra space.
Let us first understand what we want to achieve?...
Construct a Binary Tree from In-order and Pre-order traversals.
in
Algorithm,
Binary Search Tree,
Binary Tree,
Datastructure,
Java
- on 02:17:00
- 2 comments

How to construct a Binary Tree from given In order and Pre order traversals.
Let us first understand what we want to achieve? what is the input and what will be the expected output?
Question:
Two traversals are given as input,
int inorder[] =...