Giter Site home page Giter Site logo

php-interview-exercises's Introduction

PHP Interview Exercises · Build Status PRs Welcome Exercise Count All Contributors

A number of exercises to practice whiteboard interview questions in PHP.

Inside exercises directory, you can find folders containing the exercises and completed versions. There are multiple ways to solve each problem, feel free to experiment.

If you are stuck don't be afraid to search online for a pseudo-code algorithm or a solution. Even by copying and later analyzing the solution you will gain lots of experience in problem solving.

Also check out the tests and see what results are expected. Playing around with Xdebug is a plus.

It is useful to actually see how algorithms manipulate data. Visualgo is a good resource for that.

Install

  1. Clone this repository.
  2. Run composer install.

Usage

  1. Pick an exercise for example exercises/ReverseString and inside tests/ReverseString/ReverseStringTest.php delete static::markTestSkipped();.
  2. Run ./vendor/bin/phpunit or ./vendor/bin/phpunit-watcher watch to start tests.
  3. Write implementation.

This will allow you to write code and be sure that the solution is correct.

Problem Solving Patterns

To solve certain problems in the most efficient way many algorithmic patterns are available. Such as:

  • Frequency Counter
  • Multiple Pointers
  • Sliding Window
  • Divide and Conquer
  • Backtracking

And more...

Suggested Path

Aside

Exercise Count

This Exercise Counter is made with Shields IO, Axios, GitHub GraphQL and Netlify Functions.

Contributing

Do you have an idea for an exercise or a better solution? Submit a PR!

Contributors

Thanks goes to these wonderful people (emoji key):

Anton Ždanov
Anton Ždanov

💻 📖 ⚠️
ahmed
ahmed

💻 ⚠️
Roman Yepanchenko
Roman Yepanchenko

🐛
Fathom
Fathom

🐛 💻
Alexander Katynia
Alexander Katynia

🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT

php-interview-exercises's People

Contributors

azdanov avatar renovate-bot avatar allcontributors[bot] avatar ahmed-aboud avatar fathom avatar olden 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.