Merge Policies in Solr
I happened to get an chance to optimize the Solr configuration of Home Depot Canada. My mainly improvement is focused on the segments merge policies. However there are limited resources on-line, I spent some time looking into the source code of LogMergePolicy and TieredMergePolicy. I am going to share how does these two mostly used Solr merge polices work and my findings.
Maximum Subarray Problem
Maximum subarray is a typical interview question you may face. Its description can be found here.
There are two common approaches to solve this problem, dynamic programing(\(O(n)\)) and divide and conquer(\(O(n\,log\,n)\)). I am going to share the solutions and thoughts of them in this article.