Giter Site home page Giter Site logo

python-codility-solutions's Introduction

python_codility_solutions_artem_ponomarev

#Task descriptions are given on Codility website, https://app.codility.com/programmers/

Hello fellow data scietists! This repo is my attempt to scale the Codility test for job interviews. Even if your employer does not ask you to take this test, it is a good mental practice to solve a Codility problem once in a while. My language of choice is Python. However, Codility problems seem to be more of a logical puzzle, than a programming language test. You cannot import Python libraries, like pandas, in Codility IDE. All syntax has to be quite basic. The most difficult part is to make your algorithm 'efficient'. That is, it has to be either O(1), or O(n), or at worst O(n*log(n)), where n=len(A); A is the suggested input. The trick is to make the code as minimalist as possible. Avoid nested loops, objects that hold unnecessary information, and try to exit the execution as quickly as possible, using 'return' and 'break' statements, while keeping the result correct, of course.

Another diffuculty is 'edge' cases. Say, your algo gives the right result for a nice looking and short input. What about extreme cases: null input, one element in A, maybe 2 or 3 elements that are still a special case, large numbers, repeating numbers, drastically different numbers, long inputs, random inputs, inputs with a strange pattern. Or what have you...

Use the user-supplied input to test 'edge' cases.

Getting a correct answer for the default input is where the real game starts. Keep your reasoning skills sharp...

-python-codility-solutions-artemp

python-codility-solutions's People

Contributors

artemponomarevjetski avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.