# Write a program to print BST in spiral form In this article, we will understand how to print BST in spiral form. This is one of the most frequently asked interview questions in various interviews.

# A jail has N prisoners, and each prisoner has a unique id number, S, ranging from 1 to N. There are M sweets that must be distributed to the prisoners In this article, we will discuss about problem - A jail has N prisoners, and each prisoner has a unique id number, S, ranging from 1 to N. There are M sweets that must be distributed to the prisoners. The jailer decides the fairest way to do this is by sitting the prisoners down in a circle (ordered by ascending S), and then, starting with some random S, distribute one candy at a time to each sequentially numbered prisoner until all M candies are distributed. For example, if the jailer picks prisoner S = 2, then his distribution order would be (2, 3, 4, 5,..., n-1, n, 1, 2, 3, 4,...) until all M sweets are distributed. But wait —there's a catch—the very last sweet is poisoned! Can you find and print the ID number of the last prisoner to receive a sweet so he can be warned?

# Amazon interview question - SDE 2

In this acticle, I'll share interview question asked by Amazon for SDE-2 Profile.

# Write a progam to reverse digits of a number

In this article, we will understand how to write a progam to reverse digits of a number. This is one of the most frequestly asked interview question in various interviews.

# Write a function to find median given two sorted arrays

In this article, we will understand how to write a function to find median given two sorted arrays. This is one of the most frequestly asked interview question in various interviews.

# You're  given  an  unsorted  array  of  integers  where  every  integer  appears  exactly  twice,  except  for  one  integer  which  appears  only  once.   Write  an  algorithm   that  finds  the  integer  that  appears  only  once. You're  given  an  unsorted  array  of  integers  where  every  integer  appears  exactly  twice,  except  for  one  integer  which  appears  only  once.   Write  an  algorithm   that  finds  the  integer  that  appears  only  once. In this article we will understand the logic and approach to finds  the  integer  that  appears  only  once. This is one of the most popular question asked in Google interviews.

# Write a function that takes two strings and returns true if anagrams of second string is the substring of first string

In this article we will understand how to write a function that takes two strings and returns true if anagrams of second string is the substring of first string. This question was recently asked by Amazon, Google interview.