Check If two strings are Anagrams.

Check If two strings are Anagrams.
Check 2 strings are anagrams of each other. What is Anagram? An anagram is a rearrangement of the letters of one word or phrase to another word or phrase, using all the original letters exactly once. Example: 1. "evil" and "vile" is anagram...

Find all subsets of a set (Power Set)

Find all subsets of a set (Power Set)
Print power set of any given set OR Print all subsets of a set OR Find all subsets of a set OR Print all subset of an array. Given a set of numbers, print all the possible subsets of it including empty set. What is Power Set? In mathematics, the...

Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord.

Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord.
Word Ladder ( Doublets / Word-links / Word golf ) Given two words, startWord and endWord, and a dictionary, find the length of shortest transformation sequence from startWord to endWord. Rules: 1. Only one letter can be changed at a time. 2. Each...

Print Nodes in Bottom View of Binary Tree.

Print Nodes in Bottom View of Binary Tree.
Print the bottom view of Binary Tree Given a binary tree, print the nodes that is visible, when the tree is viewed from the bottom. Let us first understand what we want to achieve? what is the input and what will be the expected output? Bottom...

Print Nodes in Top View of Binary Tree

Print Nodes in Top View of Binary Tree
Print the top view of Binary Tree Given a binary tree, print the nodes that is visible, when the tree is viewed from the top. Let us first understand what we want to achieve? what is the input and what will be the expected output? Top view means,...

Print a Binary Tree in Vertical Order. Find Vertical Sum of given Binary Tree.

Print a Binary Tree in Vertical Order. Find Vertical Sum of given Binary Tree.
Print Binary Tree in Vertical Order ORPrint the Binary Tree in Vertical Order Path ORVertical order traversal of a Binary Tree. Find Vertical Sum of given Binary Tree Given a binary tree, print it vertically. Let us first understand what we want...

What is Load factor and Rehashing in Hashmap?

What is Load factor and Rehashing in Hashmap?
What is Load factor and Rehashing in Hashmap? This is the famous interview question for experienced, So Let's see what it is all about. Hashmap is very popular data structure and found useful for solving many problems due to O(1) time complexity...

How time complexity of Hashmap get() and put() operation is O(1)? Is it O(1) in any condition?

How time complexity of Hashmap get() and put() operation is O(1)? Is it O(1) in any condition?
How time complexity of Hashmap get() and put() operation is O(1)? This is the famous interview question for the beginners as well as for experienced, So Let's see what it is all about. Hashmap is very popular data structure and found useful for...

How Hashmap data structure works internally? How hashcode and equals method work in hashmap? Explain with real time example.

 How Hashmap data structure works internally? How hashcode and equals method work in hashmap? Explain with real time example.
Hashmap data structure works internally?How hashcode and equals method work in hashmap? This is the famous interview question for the beginners as well as for experienced, So Let's see what it is all about. Hashmap is very popular data structure...
Page 1 of 2812345...28Next »