Category

coding-interview

72 posts

How to prepare for your next Coding Interview

How to prepare for your next Coding Interview

Here are some tips while preparing for your coding interviews. 1. Do study or…

How to calculate angle between hour and minute hand, given a time

How to calculate angle between hour and minute hand, given a time

This problem is a simple mathematical calculation. Lets start deriving some…

Convert String to Integer - atoi - Leet Code Solution

Convert String to Integer - atoi - Leet Code Solution

Problem Statement Implement atoi which converts a string to an integer…

Check whether number is palindrome or not - Leet Code Solution

Check whether number is palindrome or not - Leet Code Solution

Problem Statement Determine whether an integer is a palindrome. An integer is a…

Zigzag Pattern String Conversion - Leet Code Solution

Zigzag Pattern String Conversion - Leet Code Solution

Problem Statement The string “PAYPALISHIRING” is written in a zigzag pattern on…

Longest Palindrome Substring - Leet Code Solution

Longest Palindrome Substring - Leet Code Solution

Problem Statement Given a string s, find the longest palindromic substring in s…

Reverse digits of a signed integer - Leet Code Solution

Reverse digits of a signed integer - Leet Code Solution

Problem Statement Given a signed integer, reverse digits of an integer. Return…

Find the Median of Two Sorted Arrays - Leet Code Solution

Find the Median of Two Sorted Arrays - Leet Code Solution

Problem Statement There are two sorted arrays nums1 and nums2 of size m and n…

Longest Substring without repeating characters - Leet Code Solution

Longest Substring without repeating characters - Leet Code Solution

Problem Statement Given a string, find the length of the longest substring…

Add two numbers(reverse order) link list Problem - Leet Code Solution

Add two numbers(reverse order) link list Problem - Leet Code Solution

Problem Statement You are given two non-empty linked lists representing two non…

Radix Sort Algorithm

Radix Sort Algorithm

A number consists of digits. Example: 843. Its a 3-digit number. Radix sort…

Counting Sort Algorithm

Counting Sort Algorithm

Counting sort runs on relatively smaller set of input. Counting sort calculates…

Young Tableau problem - Cormen

Young Tableau problem - Cormen

Young Tableau A a X b matrix is Young Tableau if all rows(from left to right…

Min Priority Queue Implementation with Heap Data structure

Min Priority Queue Implementation with Heap Data structure

Min Priority Queue is a data structure which manage a list of keys(values). And…

Max Priority Queue Implementation with Heap Data structure

Max Priority Queue Implementation with Heap Data structure

Max Priority Queue is a data structure which manage a list of keys(values). And…

Two Sum Problem - Leet Code Solution

Two Sum Problem - Leet Code Solution

Problem Statement Given an array of integers, return indices of the two numbers…

Heap Sort Algorithm

Heap Sort Algorithm

This is another very useful sorting algorithm based on Heap data structure. Read…

Index for Coding Problems

Index for Coding Problems

Sorting Problems Merge Sort Quick Sort Heap Sort Bubble Sort Selection Sort…

What is Heap Data Structure

What is Heap Data Structure

Its a tree based data structure which is a complete binary tree(all nodes have…

How to nail your Coding Interview

How to nail your Coding Interview

Here are some tips while giving your coding interviews. 1. Never try to jump to…

Maximum Subarray Problem

Maximum Subarray Problem

Problem Statement You are given an array of integers. And, you have find the…