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    
Last Updated Ratings Unique User Downloads Download Rankings
2022-01-10 (11 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 18 All time: 10,494 This week: 43Up
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

Picture of Busari Ridwan
  Performance   Level  
Innovation award
Innovation award
Nominee: 2x

 

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

 Version Control Unique User Downloads Download Rankings  
 100%
Total:18
This week:0
All time:10,494
This week:43Up

For more information send a message to info at phpclasses dot org.