Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
Did 2 leetcode today (technically 1)
https://leetcode.com/problems/...
idea:
* Palindrome means cut it half, rearrange the other half, will equal each other.
* Using javascript new map() to build a hash map
* Loop the hash, add up quotient*2, add up remainder.
* if remainder > 1, then return_sum+1
https://leetcode.com/problems/...
seen a few times in interview.
* do the big one first, i.e. if(n % (3*5) === 0)
* then n%3 === 0
* then n%5 === 0
rant
leetcode