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
- Host: GitHub
- URL: https://github.com/florianstancioiu/leetcode
- Owner: florianstancioiu
- Created: 2020-02-11T06:03:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-17T12:18:17.000Z (about 4 years ago)
- Last Synced: 2025-02-15T20:16:51.565Z (5 months ago)
- Topics: algorithm-challenges, leetcode, php
- Language: PHP
- Homepage: https://leetcode.com
- Size: 63.5 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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