[LeetCode] Median of Two Sorted Arrays (More elegant solution)

I have written a solution for this question before: http://www.lifeincode.net/programming/leetcode-median-of-two-sorted-arrays-java/ That solution seems easy to understand. However, it turns out to be very difficult to implement. The hardest part is how we come up with a correct way to handle borders. After reading some post, I found there is another way to achieve findKth number from two … Read more[LeetCode] Median of Two Sorted Arrays (More elegant solution)

Reading Notes for [All Abroad the Databus! – Linkedin’s Scalable Consistent Change Data Capture Platform]

Why do we need Databus? There is no one type of data management system that meets every needs. In most cases we will have a primary source-of-truth system and some other data systems. But we need to maintain the consistency between the primary system and other systems. There are two possible type of solutions: Application-driven … Read moreReading Notes for [All Abroad the Databus! – Linkedin’s Scalable Consistent Change Data Capture Platform]

Reading Notes for [On Brewing Fresh Espresso: LinkedIn’s Distributed Data Serving Platform]

Why Espresso? RDBMS has some shortages and it costs a lot both in terms of licensing and hardware costs. Relational Database installation requires costly, specialized hardware and extensive caching to meet scale and latency requirements. Adding capacity requires a long planing cycle. Cannot do it with 100% uptime. Data model (Or schema) don’t readily map … Read moreReading Notes for [On Brewing Fresh Espresso: LinkedIn’s Distributed Data Serving Platform]

Reading Notes for [Kafka, a Distributed Messaging System for Log Processing]

Why Kafka? Lots of “log” data generated every day, including user activities like login, page views, clicks, likes, and other queries machine metrics like CPU, memory usage. This is not only for offline analytics, but also very useful in online services. Usage may includes search relevance recommendation performance ad targeting and reporting security things. The traditional … Read moreReading Notes for [Kafka, a Distributed Messaging System for Log Processing]

[LeetCode] Palindrome Partitioning I and II(Java)

Palindrome Partitioning Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = “aab”, Return

Palindrome Partitioning II Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning of s. For example, given s = “aab”, … Read more[LeetCode] Palindrome Partitioning I and II(Java)

[LeetCode] Best Time to Buy and Sell Stock III (Java)

Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete at most two transactions. Note: You may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again). Analysis In this … Read more[LeetCode] Best Time to Buy and Sell Stock III (Java)