## LinkedIn Interview Experience | Set 1 (for SDE Internship)

Below is my interview experience with linkedin India for software development intern. First there was an online round on hackerrank where they asked 4 simple… Read More »

## Print All Distinct Elements of a given integer array

Approach: 1. Put all input integers to hashmap’s key 2. Print keySet outside the loop Java filter_none edit close play_arrow link brightness_4 code import java.util.HashMap;… Read More »

## Sort an array according to the order defined by another array

Given two arrays A1[] and A2[], sort A1 in such a way that the relative order among the elements will be same as those are… Read More »

## Binary Insertion Sort

We can use binary search to reduce the number of comparisons in normal insertion sort. Binary Insertion Sort uses binary search to find the proper… Read More »

## C Program for Binary Insertion Sort

We can use binary search to reduce the number of comparisons in normal insertion sort. Binary Insertion Sort find use binary search to find the… Read More »

## Java Program for Binary Insertion Sort

We can use binary search to reduce the number of comparisons in normal insertion sort. Binary Insertion Sort find use binary search to find the… Read More »

## Python Program for Binary Insertion Sort

We can use binary search to reduce the number of comparisons in normal insertion sort. Binary Insertion Sort find use binary search to find the… Read More »

## Given a sorted dictionary of an alien language, find order of characters

Given a sorted dictionary (array of words) of an alien language, find order of characters in the language. Examples: Input: words[] = {“baa”, “abcd”, “abca”,… Read More »

## Sorting Terminology

What is in-place sorting? An in-place sorting algorithm uses constant extra space for producing the output (modifies the given array only). It sorts the list… Read More »

## ShellSort

ShellSort is mainly a variation of Insertion Sort. In insertion sort, we move elements only one position ahead. When an element has to be moved… Read More »

## C++ Program for ShellSort

In shellSort, we make the array h-sorted for a large value of h. We keep reducing the value of h until it becomes 1. An… Read More »

## Java Program for ShellSort

In shellSort, we make the array h-sorted for a large value of h. We keep reducing the value of h until it becomes 1. An… Read More »

## C Program to Sort an array of names or strings

Given an array of strings in which all characters are of the same case, write a C function to sort them alphabetically. The idea is… Read More »

## Bucket Sort

Bucket sort is mainly useful when input is uniformly distributed over a range. For example, consider the following problem. Sort a large set of floating… Read More »

## Sort n numbers in range from 0 to n^2 – 1 in linear time

Given an array of numbers of size n. It is also given that the array elements are in range from 0 to n2 – 1.… Read More »