Hint: Binary search is mostly used for this kind of questions. The simplest form of this question would be finding pivot element, which requires you to find an index in an array that makes the sum of all elements to its left equals to the sum of all elements to its right. Leetcode 724: Find… Continue reading BLOG | Split an array into k subarrays
Month: June 2023
BLOG | Inverted index: search keywords in a list of documents
Given a list of documents and a list of keywords, how do we find all documents containing one or multiple keywords? For this question, we tokenize all documents into terms, and create a inverted index where each term is associated with a list of documents that contains that term. We use this information to rank… Continue reading BLOG | Inverted index: search keywords in a list of documents


