Code Monkey home page Code Monkey logo

algorithmic-desing-and-techniques's Introduction

Algorithmic-Desing-and-Techniques - edx Micromasters

Algorithmic Desing and Techniques - Study Material and Programming Assignment Repositories.

Solving a Programming Challenge in Five Easy Steps:

  1. Reading Problem Statement
  2. Designing an Algorithm
  3. Implementing an Algorithm
  4. Testing and Debugging
  5. Submitting to the Grading System

Why does a problem has constraints and what do they signify?:

The constraints whatever they be, provide the base for any coder to write a programme.ie… whether the algorithm which you are following to solve a problem is suitable for the given constraints or not .

Let me explain this with the help of a few examples:

Suppose for the below constraints we have to solve a problem , say sort a list of given no’s: 1<=N<=1000

So here even if you use an O(n^2) algorithm for sorting say bubble sort , it would work without an problem . The reason being that a computing machine can do upto 10^6/10^7 computations per second.

But if the constraint is, 1< =N<=100000

Now to sort a list with 100000 elements ie… 10^10 computations need to be done for the above n^2 algorithm would obviously time out, thus we use qsort/mergesort O(nlogn).

Now suppose a problem has very high constraints say: 1<=N<=10^18

So in such a case your mind should come up with solutions with O(logn) complexity, because even O(n) would time out for the reasons mentioned above .

Some Extra things to be kept in mind:

  • Suppose in a problem , if you think that solution for a problem is O(n^2) / any other polynomial complexity , then here Dynamic programming can help you to optimise the solution .
  • Crux of The discussion : So what we can conclude is that the constraints always help you to plan which data structure / algorithm is to be followed to solve a computing problem .

Some useful links :

REFERENCE: https://discuss.codechef.com/t/constraints-in-problems/6621/3

algorithmic-desing-and-techniques's People

Contributors

nitingoyal0996 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

tony-ml vibhin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.