## Select a Random Node from a Singly Linked List

Given a singly linked list, select a random node from linked list (the probability of picking a node should be 1/N if there are N… Read More »

Given a singly linked list, select a random node from linked list (the probability of picking a node should be 1/N if there are N… Read More »

Given an unsorted of distinct integers, find the largest pair sum in it. For example, the largest pair sum in {12, 34, 10, 6, 40}… Read More »

We have discussed Insertion Sort for arrays. In this article same for linked list is discussed. Below is simple insertion sort algorithm for linked list.… Read More »

Round 1 (Microsoft College Code Competition) There were 6 problems to be solved in 1h30, if I recall correctly. My team solved 3 of them… Read More »

Given an undirected and unweighted graph, find the smallest cut (smallest number of edges that disconnects the graph into two components).

We have discussed following topics on Minimum Spanning Tree. Applications of Minimum Spanning Tree Problem Kruskal’s Minimum Spanning Tree Algorithm

1. Machine Coding: Two players, two field; and have multiple ships located in their fields. They are guessing each others ship position and hitting. Tell… Read More »

Given a list of tickets, find itinerary in order using the given list. Example: Input: “Chennai” -> “Banglore” “Bombay” -> “Delhi”

We have introduced arrays in set 1 (Introduction to arrays in C).

Consider a high traffic website that receives millions of requests (of different types) per five minutes, the site has k (for example n = 1000)… Read More »

There are 5 pirates, they must decide how to distribute 100 gold coins among them. The pirates have seniority levels, the senior-most is A, then… Read More »

Round 1-Telephonic -General discussion abou project.java. Round 2-HackerEarth- 10 questions of Programming, selenium, Appium and shell scripting. Write your Interview Experience or mail it to… Read More »

In C, when we pass an array to a function say fun(), it is always treated as a pointer by fun(). Below example demonstrates the… Read More »

I was recently interviewed for SDE 2 position at OlaCabs. Write your Interview Experience or mail it to contribute@geeksforgeeks.org

Why is Quick Sort preferred for arrays? Below are recursive and iterative implementations of Quick Sort and Merge Sort for arrays.