GithubHelp home page GithubHelp logo

gitzakis / code_eval Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joedicastro/code_eval

0.0 1.0 0.0 492 KB

This is my attempt to solve some problems of this project, http://codeeval.com, using the python language. The target is to solve as many as I can, and keep the time consumed by each script below 10 seconds.

Python 100.00%

code_eval's Introduction

Code Eval Solutions

About Code Eval

Code Eval is a website to challenge programmers with programming problems intended to help you to improve your programming skills.

About this repository

There is my attempt to solve some challenge of this project, using the Python language. The target is to solve as many as I can, and keep the time consumed by each script below 10 seconds (at that point the script is interrupted by Code Eval).

Contents:

There are 3 directories, easy/, moderate/ and hard/ corresponding with the level of the challenges in the website. Inside of each hone are two types of files, the *.py2 files are the ones with the code and the *.txt files are those which contains the inputs to test the code.

About Cheating

Don't cheat! If you cheat, you only fool yourself! If you can't do it, you can not do it, that's all! Almost you tried, and if you keep learning and studying, maybe one day you can solve those challenge that seemed so hard a few early.

Be proud of what you have achieved instead, even if is little. Especially if your math and programming skills or education is not so vast (as in my case). I'm very proud to have solved all of this challenge without cheating or copy another else's solutions. That's the right attitude.

But, once you have a solution, you can learn a lot from the solutions of others. That's the purpose of this repository too. Maybe you couldn't learn a lot from my solutions, maybe even you can laugh of the most naive ones, but doesn't matter, be humble and remember that even the most idiot can teach you always something. The second purpose is to have a online backup of this code, some challenge were hard to break and I would hate to loose this code.

The most important thing isn't the Code Eval's rank that you achieve or the number of challenge that you solved, the most important thing is what you have learned in the process!

Solved Challenges

Times computed in a Intel Core i7-3770 CPU @ 3.40GHz processor.

Easy

Solved 51 challenges

 Armstrong Numbers                           0.01255 s        6.023 MiB
 Beautiful Strings                           0.01090 s        6.402 MiB
 Bit Positions                               0.00845 s        5.961 MiB
 Calculate Distance                          0.01292 s        6.047 MiB
 Capitalize Words                            0.00854 s        6.008 MiB
 Compressed Sequence                         0.00834 s        5.973 MiB
 Data Recovery                               0.00878 s        5.984 MiB
 Even Numbers                                0.00903 s        6.027 MiB
 Fibonacci Series                            0.00876 s        5.957 MiB
 File Size                                   0.00837 s        6.016 MiB
 Find A Writer                               0.00837 s        5.965 MiB
 Fizz Buzz                                   0.03060 s        6.164 MiB
 Happy Numbers                               0.01463 s        5.996 MiB
 Hex To Decimal                              0.00836 s        6.012 MiB
 Hidden Digits                               0.00867 s        5.988 MiB
 Json Menu Ids                               0.00864 s        5.965 MiB
 Juggling With Zeros                         0.00869 s        5.957 MiB
 Lettercase Percentage Ratio                 0.00942 s        6.031 MiB
 Longest Word                                0.01881 s        5.996 MiB
 Lowercase                                   0.00830 s        5.965 MiB
 Lowest Unique Number                        0.00995 s        6.324 MiB
 Mixed Content                               0.00859 s        5.992 MiB
 Morse Code                                  0.00859 s        6.094 MiB
 Multiples Of A Number                       0.00841 s        5.992 MiB
 Multiplication Tables                       0.00857 s        5.961 MiB
 Multiply Lists                              0.00871 s        5.969 MiB
 N Mod M                                     0.00830 s        5.977 MiB
 Odd Numbers                                 0.00835 s        5.992 MiB
 Penultimate Word                            0.00834 s        5.945 MiB
 Prime Palindrome                            0.00862 s        6.293 MiB
 Query Board                                 0.01229 s        6.586 MiB
 Racing Chars                                0.00872 s        6.020 MiB
 Reverse Words                               0.01667 s        5.973 MiB
 Rightmost Char                              0.00865 s        6.004 MiB
 Road Trip                                   0.00847 s        5.961 MiB
 Roller Coaster                              0.00961 s        6.066 MiB
 Roman Numerals                              0.00852 s        6.016 MiB
 Self Describing Numbers                     0.00946 s        6.281 MiB
 Set Intersection                            0.00842 s        6.004 MiB
 Shortest Repetition                         0.00839 s        6.016 MiB
 Simple Sorting                              0.00839 s        5.930 MiB
 Splitted Number                             0.00904 s        5.957 MiB
 Sum Of Digits                               0.00866 s        5.945 MiB
 Sum Of Integers From File                   0.00857 s        5.996 MiB
 Sum Of Primes                               0.01197 s        6.312 MiB
 Swap Case                                   0.00845 s        6.090 MiB
 Swap Elements                               0.00833 s        5.980 MiB
 The Major Element                           0.00942 s        6.340 MiB
 Unique Elements                             0.00853 s        6.043 MiB
 Word To Digit                               0.00850 s        6.059 MiB
 Working Experience                          0.00900 s        5.996 MiB

Moderate

Solved 38 challenges

 A Pile Of Bricks                            0.00995 s        6.207 MiB
 Array Absurdity                             0.00944 s        6.348 MiB
 Bats Challenge                              0.00850 s        6.012 MiB
 Cash Register                               0.00859 s        6.012 MiB
 Color Code Converter                        0.00929 s        6.199 MiB
 Counting Primes                             0.10363 s        8.648 MiB
 Decimal To Binary                           0.00930 s        5.977 MiB
 Decode Numbers                              0.01443 s        6.176 MiB
 Detecting Cycles                            0.01246 s        6.000 MiB
 Email Validation                            0.00930 s        5.965 MiB
 Endianness                                  0.00851 s        5.938 MiB
 Find A Square                               0.00903 s        6.062 MiB
 First Non Repeated Character                0.00944 s        6.309 MiB
 Flavius Josephus                            0.00994 s        6.004 MiB
 Jolly Jumpers                               0.00858 s        5.992 MiB
 Longest Lines                               0.00852 s        6.023 MiB
 Minimun Coins                               0.00850 s        6.059 MiB
 Mth To Last Element                         0.00838 s        6.008 MiB
 Number Of Ones                              0.01122 s        6.414 MiB
 Number Pairs                                0.00884 s        6.180 MiB
 Overlapping Rectangles                      0.00857 s        5.984 MiB
 Pangrams                                    0.00940 s        6.027 MiB
 Pascals Triangle                            0.00957 s        5.988 MiB
 Pass Triangle                               0.00859 s        6.012 MiB
 Point In Circle                             0.00957 s        6.223 MiB
 Predict The Number                          0.01450 s        6.438 MiB
 Remove Characters                           0.00926 s        6.414 MiB
 Reverse And Add                             0.00993 s        5.977 MiB
 Reverse Groups                              0.00848 s        6.113 MiB
 Roman And Arabic                            0.00876 s        6.027 MiB
 Seek For An Intruder                        0.01208 s        6.387 MiB
 Stack Implementation                        0.00862 s        6.094 MiB
 String Rotation                             0.00947 s        6.348 MiB
 Sudoku                                      0.00865 s        6.027 MiB
 Sum Of Integers                             0.01167 s        6.027 MiB
 Sum To Zero                                 0.00872 s        6.098 MiB
 Trailing String                             0.01833 s        6.008 MiB
 Valid Parentheses                           0.01588 s        6.059 MiB

Hard

Solved 7 challenges

 Closest Pair                                0.00884 s        6.070 MiB
 Following Integer                           0.00890 s        6.090 MiB
 Minimum Path Sum                            0.00879 s        6.047 MiB
 Poker Hands                                 0.01584 s        6.504 MiB
 Prefix Expressions                          0.00877 s        6.188 MiB
 String List                                 0.01303 s        6.094 MiB
 String Permutations                         0.00905 s        6.109 MiB

code_eval's People

Contributors

joedicastro avatar

Watchers

 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.