Jun

01

2020

Mathematical Algorithms for the day before your coding interview

ebookdl 1 Jun 2020 03:59 LEARNING » e-book

Mathematical Algorithms for the day before your coding interview

English | 2020 | ASIN: B089G56R5H | 42 Pages | PDF, EPUB, AZW3 | 1.83 MB

Mathematical Algorithms are fundamentally important as several real-life problems can be modeled as a Mathematical problem. Solving such problems require mathematical insights.

These problems are a fundamental part of Interviews as it illustrates the thinking process of the candidate clearly. By going through the problems in this book, you will be well prepared to tackle any Mathematical problem.

Following are some of the problems we have explored which involve ideas to solve a wider range of problems.

Smallest number with multiples

This is a unique problem where we learn key insights regarding Prime factorization, role of primes in multiples and much more.

We improve the time complexity of this problem starting from O(N^3 * log N) to O(N * log N * log N) to O(N * log log N).

Largest palindrome

In this problem, we have reduced 810000 comparisons to 362 comparisons based on three deep insights. This is a dramatic improvement and demonstrates that even if time complexity cannot be improved, the performance can be improved significantly.

GCD of sub-parts

This problem brings up key insights involving GCD (a common and important topic) and in the process, we have explored several standard algorithms like Euclidean s GCD Algorithm in the path of developing our custom algorithm for the given problem.

Next Permutation

This problem demonstrates a significant improvement from O(N^N x N x logN) time to O(N) time complexity. Moreover, it illustrates that improving time complexity does not necessarily mean increasing space complexity as it reduces space complexity from O(N^N) to O(1).

This brings in idea of Greedy Algorithms to Mathematical Algorithm and in the process, we have explored several standard algorithms like Heaps Algorithm.

With these problems and the thought process to solve them, you will be fully prepared.

This book has been carefully prepared and reviewed by Top programmers and Algorithmic researchers and members of OpenGenus. We would like to thank Aditya Chatterjee and Ue Kiao for their expertise in this domain and reviews from professors at The University of Tokyo and Tokyo Institute of Technology.

High Speed Download

Add Comment

  • People and smileys emojis
    Animals and nature emojis
    Food and drinks emojis
    Activities emojis
    Travelling and places emojis
    Objects emojis
    Symbols emojis
    Flags emojis