Details
-
Abouthttps://github.com/kenpeter https://au.linkedin.com/in/thegaryliang
-
SkillsLearner, PHP, nodejs, AWS, laravel, code igniter, Linux, arduino a little bit of react, vue, express, mongo
-
LocationMelbourne Australia
-
Github
Joined devRant on 6/25/2017
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
-
Redo the leetcode from yesterday
https://leetcode.com/problems/...
other people's answer: https://leetcode.com/problems/...-time-O(1)-space
I converted the java solution to javascript. -
Did 1 leetcode today
https://leetcode.com/problems/...
Able to run the algo on paper and wrote down the javascript, not able to pass some test cases. so need to copy the answer.
My idea is similar, but the answer is much better. The idea is similar to tracking max number, but this time we have max1, max2, max3 (max1 is largest)
init all of them to null.
looping number array, if number is in maxs, skip. If there number > max1, we update all max1-3
if number > max2, update max2-3
then number > max3, update max3
last return statement is like this: return max3 == null ? max1 : max3; -
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 === 01 -
Did 2 leetcodes today. (will be more in future)
https://leetcode.com/problems/...
I remember I did something similar. The idea is that converting single letter to number, so sum2 - sum1 = the_added_letter
https://leetcode.com/problems/...
Don't know how to do it, so copy the answer. (I copy the answers most of the time) The idea is that on the same level, we sum the left or keep going down to left. For right, we just go down there. Little trick is that we use root.left.left or root.left.right.2 -
When I read, I found that I like to jumping or really need to understand individual words. Very slow and low comprehension. put lots of effort in school, still at bottom. Reading this book, I found that mild dyslexia may be the issue. Or something similar.1
-
I have a habit to comment every single line of code, this helps comprehension but this dirty the code and everyone complain. Is it any way to do such task.6
-
Recently, I failed a lot. Most of them were interviews. Some failed at code challenge. Some of them were leet code type challenge. Some failed at less quality vs other people. Used to be ashamed or angry. Now able to embrace it. Thanks to jack ma's documentary. Start to integrated his philosophy into life.1
-
Got a code exercise. A small cli nodejs tool. Could someone do a code review? https://github.com/kenpeter/mb1
-
A question, how do I overcome the mindset of doing code challenge in hacker rank every day? 1. Hard to understand the challenge about. 2. Even easy question, very unwilling to do it. 3. If gets stuck, should I look at the answer?
-
Came back from China and told I may be losing my job. Cannot remember how many times I got fired on the spot.6
-
In China now, cannon use gmail etc. Any specific way to get around it? If use VPN which one I should use?5
-
I found out that if I cannot get it right in the first place in software development, then I am fucked. No matter how I fixed it, still fucked.
-
Idea: if I want to be successful, I need to have good habits, because I am in autopilot mode 95% of my lifetime.2
-
If you like that job, but you don't have much experience about it. How do you get it? Work for free and wait for opportunity opens up?
-
I was at the bottom of my school and even after I start working as a professional. I was able to overcome my own struggle and become a better person. If I can do it, you can do it too. "We are all equally smart. It is just a matter of strategy".
https://github.com/kenpeter/...3