## Print Processes and its messages from a given log file

Problem Statement:  There is an application that has several processes running in parallel and each process prints the logs in … Read more

## Find two elements whose sum is closest to zero

Objective: Given an array of positive and negative integers, write a algorithm to find the two elements such their sum … Read more

## Find the element which appears maximum number of times in the array.

Objective: Given an array of integers, write a algorithm to find the element which appears maximum number of times in … Read more

## Find duplicates in an given array in O(n) time and O(1) extra space.

Objective: Given an array of integers, find out duplicates in it. Example: int [] a = {4, 6, 2, 1, … Read more

## Find the last non repeating character in a given string.

Objective: Given a string, write an algorithm to find the last non repeating character in it. Example: String input = … Read more

## Find the last repeating character in a given string.

Objective: Given a string, write an algorithm to find the last repeating character in it. Example: String input = “horizon … Read more

## The Word Break Problem

Objective: Given a string and a dictionary of words, find out if the input string can be broken into a … Read more

## Find Whether Two Strings are Permutation of each other

Objective: Given Two Strings, check whether one string is a permutation of other

Input: Two Strings

Output: True or false based on whether strings are permutations of others or not.

Example:

```"sumit" and "tiums" are permutations of each other.

"abcd" and bdea" are not permutations of each other.

```

Approach:

Method 1: Time Complexity – O(nlgn)

## Hash Table Implementation

Objective: To implement a Hash Table

Input:  A set of pairs of keys and values

Approach:

• Create a Hash Table
• Hashtable<Integer, String> ht = new Hashtable<Integer, String>();
• Insert values in hash table using put(key,value)
• ht.put(key, value);