Programming Reflection May 17

wpid-Programming-Wallpaper-3
1. Array is easy to index specific element with index, it’s easier to calculate the difference between different elements than linked list.
2. LeetCode Trap Rain Water problem: iterate left and right elements for each element in the input array, update left and right largest number if larger than the current ones, then get difference between current element and min (leftLargest, rightLargest) as the water in current bucket.
3. Permutation algorithm: one solution is switch each element with current depth element, another one is to remove each element temporarily and go to next depth to generate permutation recursively (recursion can scale down the problem set)
Donate $5 to me for a coffee with PayPal and read more professional and interesting technical blog articles. Feel free to visit my web app, WhizWallet, to apply for credit, store or gift cards, DealsPlus to browse daily deals and store coupons to save money.
Follow me @Yaoli0615 at Twitter to get latest tech updates.
Resources:

Clean Code: A Handbook of Agile Software Craftsmanship

Ruminations on C++: A Decade of Programming Insight and Experience

Advertisements

About liyao13

Yao Li is a web and iOS developer, blogger and he has a passion for technology and business. In his blogs, he shares code snippets, tutorials, resources and notes to help people develop their skills. Donate $5 to him for a coffee with PayPal at About Me page and read more professional and interesting technical blog articles. Follow him @Yaoli0615 at Twitter to get latest tech updates.
This entry was posted in CS Research&Application, Intern&Job, IT, Uncategorized and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s