### How to nail your Coding Interview

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

May 08, 2019

This topic is one of the most common studied. When somebody started preparation of coding interviews. Sorting algorithms would in his top 2 topics. Even typical computer science graduate study sorting algorithms 3-4 times before they complete graduation.

- These are one of the most fundamental building block which helps in other complex algorithms.
- If you understand different tricks and basics around these algorithms, you can solve many-many more complex problems. Or, you can utilize the code somewhere.
- Most common techniques
**Divide and Conquer**, covers few sorting algorithms. Which gives you more understanding of**Divide and Conquer**algorithms. - In other computational algorithms, you must be using one of sorting algorithms either directly or indirectly.
- These are used in database queries And, the list is endless.

There are lot of sorting algorithms available, if you search in wikipedia. But, you should consider reading few of them. In below section, I will mention the important ones.

There are lot of Sorting algorithms out there. I’ve categorized them as below:

Very basic ones. You should consider reading them at least once.

- Bubble Sort
- Selection Sort
- Insertion Sort (Important)

Below algorithms must be on your tips.

- Merge Sort
- Quick Sort
- Heap Sort

You should be familiar with these algorithms, although not much deep knowledge is required.

- Bucket Sort
- Counting Sort
- Radix Sort

Algorithms | Average(Expected) Running time | Worst Running time |
---|---|---|

Insert Sort | O(n^2) | O(n^2) |

Bubble Sort | O(n^2) | O(n^2) |

Selection Sort | O(n^2) | O(n^2) |

Quick Sort | O(n log n) | O(n^2) |

Merge Sort | O(n log n) | O(n log n) |

Heap Sort | O(n log n) | O(n log n) |

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

Problem Statement Given a linked list, swap every two adjacent nodes and return…

Problem Statement Given an array nums, write a function to move all 0’s to the…

Problem Statement Given a non-empty array of digits representing a non-negative…

Its a kind of incremental insertion technique, where the algorithm build up…

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

Problem Statement You are given a string text of words that are placed among…

Problem Statement You are given a rows x cols matrix grid. Initially, you are…

Problem Statement Given a string s, return the maximum number of unique…

Problem The Leetcode file system keeps a log each time some user performs a…

Problem Statement Replace all spaces in a string with ‘%20’ (three characters…

Problem Implement an algorithm to determine if a string has all the characters…