Coder Social home page Coder Social logo

codility's Introduction

codility

coding lessons

Ch Ex expected worst-case time complexity expected worst-case space complexity* Solution 1 Solution 2 Solution 3
1 Iterations BinaryGap O(log(N)) O(1) Solution
2 Arrays CyclicRotation n/a n/a Solution
OddOccurencesInArray O(N) O(1) Solution
3 Time Complexity FrogJmp O(1) O(1) Solution
PermMissingElem O(N) O(1)* Solution
TapeEquilibrium O(N) O(N)* Solution
4 Counting Elements FrogRiverOne O(N) O(X) Solution
MissingInteger O(N) O(N) Solution
PermCheck O(N) O(N) frequency array test by induction
MaxCounters O(N+M) O(N) lazy
5 Prefix Sums CountDiv O(1) O(1) math trick
PassingCars O(N) O(1) solution
GenomicRangeQuery O(N+M) O(N) solution
MinAvgTwoSlice O(N) O(N) solution
6 Sorting MaxProductOfThree O(N*log(N)) O(1) 77% sorted()
Distinct O(N*log(N)) O(N) sorted()
Triangle O(N*log(N)) O(N) sorted()
NumberOfDiscIntersections O(N*log(N)) O(N) solution
7 Stacks & Queues Nesting O(N) O(1) solution
Brackets O(N) O(N) solution
Fish O(N) O(N) stack pop()
StoneWall O(N) O(N) stack pop()
8 Leader Dominator "efficient" "efficient" 83% 91% stack
EquiLeader "efficient" "efficient" 55% counts
9 Max Slice MaxProfit "efficient" "efficient" 88% 100%
MaxSliceSum "efficient" "efficient" 53% 100%
MaxDoubleSliceSum "efficient" "efficient" modified Kadane's Algorithm
10 Prime & Composite Numbers CountFactors "efficient" "efficient" 100% (O(sqrt(N))
MinPerimeterRectangle "efficient" "efficient" 100% (O(sqrt(N))
Peaks "efficient" "efficient" 100% O(N*log(log(N)))
Flags
11 title ex t s s1 s2 s3
12 title ex t s s1 s2 s3
13 title ex t s s1 s2 s3
14 title ex t s s1 s2 s3
15 title ex t s s1 s2 s3
16 title ex t s s1 s2 s3
17 title ex t s s1 s2 s3
90 title ex t s s1 s2 s3
91 title ex t s s1 s2 s3
92 title ex t s s1 s2 s3
99 title ex t s s1 s2 s3

*not counting the storage required for input arguments

codility's People

Contributors

marcusplieninger avatar

Watchers

James Cloos 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.