An open API service indexing awesome lists of open source software.

https://github.com/florianstancioiu/leetcode

My PHP solutions for leetcode problems
https://github.com/florianstancioiu/leetcode

algorithm-challenges leetcode php

Last synced: 3 months ago
JSON representation

My PHP solutions for leetcode problems

Awesome Lists containing this project

README

        

# Problems with valuable insights
* 1389: `array_splice` let's you put elements in an array without removing the existing element at that location (the keys for every element after it are incremented by 1)
* 1390: slight variation of the divisors algorithm shown on codility - do memorize
* 169: variation of leader election (leader always exists) - do memorize
* 1396: you use `number_format($nr, $precision)` to set the precision of a float number - yes, it's accurate
* 1396: the problem can only be solved using `Iterator` objects
* 202: `str_split` can be used to create an array of digits for numbers
* 53: there are 2 versions of kadanes algorithm, one for max sum and one for max elements, this is for the sum, the one on codility is about the elements
* 122: when you think of peaks and valleys try 2 pointers technique or greedy (learn 2 pointer and greedy...)
* 49: you can't use the sum of the asci character codes to figure out the permutations of a string because the sums dont add up to distinct numbers

# Problems that proved to be more than I can handle at the moment of taking
* 5349
* 1390
* 74
* 198 (I didn't submit anything because I didn't research DP well enough)
* 1396* (unsolved)
* 122 (solved from first try, but it took way to long to figure it out because I'm unfamiliar with this type of question)

# To do
* Check problems in which I didn't get a score over 70%, maybe I can learn new stuff