PHP Classes

Laravel Algorithm: Implements several algorithms as Laravel services

Recommend this page to a friend!
  Info   View files Documentation   View files View files (92)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2022-01-10 (5 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 31 All time: 10,519 This week: 165Up
Version License PHP version Categories
algorithm 1.0.0The PHP License5Algorithms, PHP 5, Libraries
Description Author

This package implements several algorithms as Laravel services.

It provides a Laravel application with service classes to implement several types of algorithms to solve problems of various kinds.

Currently, it provides services that implement algorithms like:

- Barter market to calculate how many comic books you can trade for coins

- Convert a number from Integer to a string that represents that number in the Roman format

- Convert a number from Roman string to the Integer that represents that number in decimal

- Calculate the median of values from two arrays

- Check if a number is a palindrome by verifying if reverting the order of number digits, it would appear to be the same number

- Calculate the reverse of a number

Innovation Award
PHP Programming Innovation award nominee
January 2022
Number 6
Laravel services allow developers to implement certain services to be easy to reuse in different applications.

This package implements several types of calculation algorithms as Laravel services.

Multiple Laravel applications can reuse these Laravel services without researching and developing the code to implement these calculation algorithms.

Manuel Lemos
Picture of Busari Ridwan
  Performance   Level  
Name: Busari Ridwan <contact>
Classes: 4 packages by
Country: Nigeria Nigeria
Age: ???
All time rank: 354925 in Nigeria Nigeria
Week rank: 458 Up7 in Nigeria Nigeria Up
Innovation award
Innovation award
Nominee: 3x

Details

Algorithm Solutions

This repository contains different algorithm questions and solutions from hackerank, leetcode and some of Vanhack code test. To run the algorithms, use the following steps as all will be through the laravels `php artisan command`

The following step will be taken to run the different algorithm classes in the repo.

  1. Clone the repository
  2. Run ````composer install````
  3. Run ```php artisan``` to see all the artisan commands
  4. Pick the one that suites the algorithm topic you wanna run. The artisan commands is formed with the topic of the algorithm test.

Barter Market

To run the barter market test on any combination of inputs, follow the steps below

  1. 
    
  2. Supply the combination of inputs
  3. Wait for the expected result

Palindrome Numbers

Run through the following steps below

  1. 
    
  2. Supply the number to be checked
  3. Wait for the output result

Median of two sorted arrays

Run through the following steps

  1. 
    
  2. supply the numbers as requested
  3. Wait for the calculated median

Reverse Integer

  1. 
    
  2. Supply the integer to be reversed
  3. Wait for the expected result/output

Integer to Roman

  1. 
    
  2. Supply the integer to be converted to roman numeral
  3. Wait for the equivalent output

Roman to Integer

  1. 
    
  2. Supply the roman numerals to be converted to integer
  3. Wait for the equivalent output

NB

Pull request are equally welcome as this is an open source repository

  Files folder image Files  
File Role Description
Files folder image.idea (6 files)
Files folder imageapp (1 file, 5 directories)
Files folder imagebootstrap (1 file)
Files folder imageconfig (13 files)
Files folder imagedatabase (3 directories)
Files folder imagepublic (3 files)
Files folder imageresources (4 directories)
Files folder imageroutes (4 files)
Files folder imagetests (2 files, 2 directories)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .env.example Data Auxiliary data
Accessible without login Plain text file .styleci.yml Data Auxiliary data
Plain text file artisan Class Class source
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file package.json Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file server.php Aux. Auxiliary script
Accessible without login Plain text file webpack.mix.js Data Auxiliary data
Accessible without login Plain text file yarn.lock Data Auxiliary data

  Files folder image Files  /  .idea  
File Role Description
  Accessible without login Plain text file laravel-6.iml Data Auxiliary data
  Accessible without login Plain text file misc.xml Data Auxiliary data
  Accessible without login Plain text file modules.xml Data Auxiliary data
  Accessible without login Plain text file php.xml Data Auxiliary data
  Accessible without login Plain text file vcs.xml Data Auxiliary data
  Accessible without login Plain text file workspace.xml Data Auxiliary data

  Files folder image Files  /  app  
File Role Description
Files folder imageConsole (1 file, 1 directory)
Files folder imageExceptions (1 file)
Files folder imageHttp (1 file, 2 directories)
Files folder imageProviders (5 files)
Files folder imageService (1 file, 6 directories)
  Plain text file User.php Class Class source

  Files folder image Files  /  app  /  Console  
File Role Description
Files folder imageCommands (6 files)
  Plain text file Kernel.php Class Class source

  Files folder image Files  /  app  /  Console  /  Commands  
File Role Description
  Plain text file BarterMarket.php Class Class source
  Plain text file IntegerToRoman.php Class Class source
  Plain text file MediaOfTwoSortedArrays.php Class Class source
  Plain text file PalindromeNumbers.php Class Class source
  Plain text file ReverseInteger.php Class Class source
  Plain text file RomanToInteger.php Class Class source

  Files folder image Files  /  app  /  Exceptions  
File Role Description
  Plain text file Handler.php Class Class source

  Files folder image Files  /  app  /  Http  
File Role Description
Files folder imageControllers (1 file, 1 directory)
Files folder imageMiddleware (7 files)
  Plain text file Kernel.php Class Class source

  Files folder image Files  /  app  /  Http  /  Controllers  
File Role Description
Files folder imageAuth (6 files)
  Plain text file Controller.php Class Class source

  Files folder image Files  /  app  /  Http  /  Controllers  /  Auth  
File Role Description
  Plain text file ConfirmPasswordController.php Class Class source
  Plain text file ForgotPasswordController.php Class Class source
  Plain text file LoginController.php Class Class source
  Plain text file RegisterController.php Class Class source
  Plain text file ResetPasswordController.php Class Class source
  Plain text file VerificationController.php Class Class source

  Files folder image Files  /  app  /  Http  /  Middleware  
File Role Description
  Plain text file Authenticate.php Class Class source
  Plain text file CheckForMaintenanceMode.php Class Class source
  Plain text file EncryptCookies.php Class Class source
  Plain text file RedirectIfAuthenticated.php Class Class source
  Plain text file TrimStrings.php Class Class source
  Plain text file TrustProxies.php Class Class source
  Plain text file VerifyCsrfToken.php Class Class source

  Files folder image Files  /  app  /  Providers  
File Role Description
  Plain text file AppServiceProvider.php Class Class source
  Plain text file AuthServiceProvider.php Class Class source
  Plain text file BroadcastServiceProvider.php Class Class source
  Plain text file EventServiceProvider.php Class Class source
  Plain text file RouteServiceProvider.php Class Class source

  Files folder image Files  /  app  /  Service  
File Role Description
Files folder imageBarterMarket (1 file)
Files folder imageIntegerToRoman (1 file)
Files folder imageMedianOfTwoSortedArrays (1 file)
Files folder imagePalindromeNumbers (1 file)
Files folder imageReverseInteger (1 file)
Files folder imageRomanToInteger (1 file)
  Plain text file BaseService.php Class Class source

  Files folder image Files  /  app  /  Service  /  BarterMarket  
File Role Description
  Plain text file BarterMarket.php Class Class source

  Files folder image Files  /  app  /  Service  /  IntegerToRoman  
File Role Description
  Plain text file IntegerToRoman.php Class Class source

  Files folder image Files  /  app  /  Service  /  MedianOfTwoSortedArrays  
File Role Description
  Plain text file MedianOfTwoSortedArrays.php Class Class source

  Files folder image Files  /  app  /  Service  /  PalindromeNumbers  
File Role Description
  Plain text file PalindromeNumbers.php Class Class source

  Files folder image Files  /  app  /  Service  /  ReverseInteger  
File Role Description
  Plain text file ReverseInteger.php Class Class source

  Files folder image Files  /  app  /  Service  /  RomanToInteger  
File Role Description
  Plain text file RomanToInteger.php Class Class source

  Files folder image Files  /  bootstrap  
File Role Description
  Plain text file app.php Class Class source

  Files folder image Files  /  config  
File Role Description
  Plain text file app.php Class Class source
  Plain text file auth.php Class Class source
  Accessible without login Plain text file broadcasting.php Aux. Auxiliary script
  Accessible without login Plain text file cache.php Aux. Auxiliary script
  Accessible without login Plain text file database.php Aux. Auxiliary script
  Accessible without login Plain text file filesystems.php Aux. Auxiliary script
  Accessible without login Plain text file hashing.php Aux. Auxiliary script
  Plain text file logging.php Class Class source
  Accessible without login Plain text file mail.php Aux. Auxiliary script
  Accessible without login Plain text file queue.php Aux. Auxiliary script
  Accessible without login Plain text file services.php Aux. Auxiliary script
  Accessible without login Plain text file session.php Aux. Auxiliary script
  Accessible without login Plain text file view.php Aux. Auxiliary script

  Files folder image Files  /  database  
File Role Description
Files folder imagefactories (1 file)
Files folder imagemigrations (3 files)
Files folder imageseeds (1 file)

  Files folder image Files  /  database  /  factories  
File Role Description
  Plain text file UserFactory.php Class Class source

  Files folder image Files  /  database  /  migrations  
File Role Description
  Plain text file 2014_10_12_000000_create_users_table.php Class Class source
  Plain text file 2014_10_12_100000_...rd_resets_table.php Class Class source
  Plain text file 2019_08_19_000000_...iled_jobs_table.php Class Class source

  Files folder image Files  /  database  /  seeds  
File Role Description
  Plain text file DatabaseSeeder.php Class Class source

  Files folder image Files  /  public  
File Role Description
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Plain text file index.php Class Class source
  Accessible without login Plain text file robots.txt Doc. Documentation

  Files folder image Files  /  resources  
File Role Description
Files folder imagejs (2 files)
Files folder imagelang (1 directory)
Files folder imagesass (1 file)
Files folder imageviews (1 file)

  Files folder image Files  /  resources  /  js  
File Role Description
  Accessible without login Plain text file app.js Data Auxiliary data
  Accessible without login Plain text file bootstrap.js Data Auxiliary data

  Files folder image Files  /  resources  /  lang  
File Role Description
Files folder imageen (4 files)

  Files folder image Files  /  resources  /  lang  /  en  
File Role Description
  Accessible without login Plain text file auth.php Aux. Auxiliary script
  Accessible without login Plain text file pagination.php Aux. Auxiliary script
  Accessible without login Plain text file passwords.php Aux. Auxiliary script
  Accessible without login Plain text file validation.php Aux. Auxiliary script

  Files folder image Files  /  resources  /  sass  
File Role Description
  Accessible without login Plain text file app.scss Data Auxiliary data

  Files folder image Files  /  resources  /  views  
File Role Description
  Accessible without login Plain text file welcome.blade.php Aux. Auxiliary script

  Files folder image Files  /  routes  
File Role Description
  Accessible without login Plain text file api.php Example Example script
  Accessible without login Plain text file channels.php Example Example script
  Accessible without login Plain text file console.php Example Example script
  Accessible without login Plain text file web.php Aux. Auxiliary script

  Files folder image Files  /  tests  
File Role Description
Files folder imageFeature (1 file)
Files folder imageUnit (1 file)
  Plain text file CreatesApplication.php Class Class source
  Plain text file TestCase.php Class Class source

  Files folder image Files  /  tests  /  Feature  
File Role Description
  Plain text file ExampleTest.php Class Class source

  Files folder image Files  /  tests  /  Unit  
File Role Description
  Plain text file ExampleTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:31
This week:0
All time:10,519
This week:165Up
For more information send a message to info at phpclasses dot org.