Count zeros in sorted matrix
Count zeros in a row wise and column wise sorted matrix
Lets understand the problem statement graphically and it will be more clear,
...
Home
»
Archives for October 2016
Count zeros in a row wise and column wise sorted matrix
in
Algorithm,
Datastructure,
Interviews,
Matrix
- on 12:14:00
- No comments
Search in a row wise and column wise sorted matrix
in
Interviews,
Java,
Matrix,
Miscellaneous
- on 12:02:00
- No comments

Find number in sorted matrix
Given an n x n matrix, where every row and column is sorted in increasing order. Given a number k, how to decide whether this k is in the matrix. OR
Search number in a row wise and column wise sorted matrix.
Lets...
Find middle element of a linked list
in
Algorithm,
Datastructure,
Interviews,
Linked List
- on 05:33:00
- No comments

Find middle element of a linked list in Java
Given a singly linked list find middle of the linked list.
Find Nth node from last in a linked list
Lets understand the problem statement graphically and it will be more clear,
...
Convert Sorted Linked List to balanced BST
in
Algorithm,
Binary Search Tree,
Binary Tree,
Datastructure,
Interviews,
Linked List
- on 10:03:00
- No comments

Convert Sorted Linked list to balanced Binary Search Tree
Convert sorted list to binary search tree
Lets simplify the question statement, Given a singly Linked List where elements are sorted in ascending order convert it to a height balanced...
Sorted Array to Balanced Binary Search Tree (BST)
in
Binary Search Tree,
Binary Tree,
Interviews
- on 03:47:00
- No comments

Convert Sorted Array to Balanced Binary Search Tree
Given a sorted array, create a Balanced Binary Search Tree using array elements.
A Binary Search Tree is called Balanced if, the height of left subtree and height of right subtree of Root differ...
Union and Intersection of Two Sorted Arrays
in
Array,
Interviews
- on 13:10:00
- No comments

Union and Intersection of Two Sorted arrays
Given two sorted arrays of any length, Find Union and Intersection of given arrays.
Lets understand the problem statement graphically and it will be more clear,
Union and Intersection of two arrays in...
Merge two sorted arrays in Java
in
Array,
Interviews
- on 08:13:00
- No comments

Merge two sorted arrays Java
Merge two sorted arrays in java.
Lets simplify problem statement, given two sorted arrays,
you need to merge it in one array such that merged array should also be sorted.
Lets understand the...
Clone linked list with next and random pointer
in
Algorithm,
Datastructure,
Linked List
- on 05:47:00
- No comments

Clone linked list with next and random pointer
You are given a Doubly Link List with one pointer of each node pointing to the next node just like in a singly link list. The second pointer however can point to any node in the list and not just the...
Clone Linked list in Java
in
Interviews,
Linked List
- on 12:42:00
- No comments

Copy linked list in Java
Given a Linked list, Create a deep copy of Linked list.
Lets understand the problem statement graphically and it will be more clear,
...
Serialize and Deserialize a Binary Tree
in
Binary Tree,
Interviews
- on 10:55:00
- No comments

Serialize and Deserialize a Binary Tree
Design an algorithm to serialize and deserialize given Binary Tree.
Serialization is to store tree in a File/String, so that it can be later restored.
Deserialization is reading tree back from file.
Lets...
Trapping Rain Water between Towers
in
Algorithm,
Datastructure,
Interviews
- on 13:07:00
- No comments

How Much Water Can A Bar Graph Hold
Given an bar graph, encoded as an array of non-negative integers, calculate the units of water that this bar graph can hold.
Let us put in technical terms,
Given n non-negative integers representing an elevation...