Java Discover

Java Discover is a Java technical blog mainly created for sharing our thoughts and programming question to the world of Java Programmers..

Find the smallest window in a string containing all characters of another string (With smallest window)

›
Given two strings string1 and string2, find the smallest substring in string1 containing all characters of string2 efficiently. For Exampl...

How to find missing number in a sequential array ?

›
Given a list of sequential integers and need to finding a missing number from the list of numbers. For example if we have an array like ...

Split the array into two equal Sum subarrays

›
Given an array of integers greater than zero, find it possible to split it in two subarrays such that the sum of the two subarrays is the...

How to do simple matrix multiplication

›
Simple matrix multiplication with sample java code. public class MatrixMultiplication { public static void main ( String [...

How to find the largest subarray with sum 0

›
Given an array of integers, find the largest subarray with sum equals to 0. If theres no subarray with sum 0 then print as " No subar...

How to find integer pairs with given sum

›
Given an array of integers, and a number ‘sum’, find the number of pairs of integer in the array whose sum is equal to ‘sum’. Array...

How to print singly linked list in reverse order

›
If we talk about Singly Linked List then it will be a 1 way traversal from head node to tail node. But if we need to print the linked list ...

How to Design a simple LRU cache in Java

›
Design and implement a data structure for Least Recently Used (LRU) cache by supporting set() and get() operations with O(1) complexity.  ...
‹
›
Home
View web version
Powered by Blogger.