Tag: divide_and_conquer
RLEIterator -- 3rd attempt
Date: 2/1/2024Tags:algorithmsleetcodedivide_and_conquerThe journal entry discusses the revised implementation of the RLEIterator class, which converts an encoding array into a private array of objects and handles requests for the next n elements by iterating through the private array and adjusting the block's count and reinserting it if necessary, with the code provided.
Number of Equal Numbers Blocks --- 4th attempt
Date: 2/1/2024Tags:algorithmsleetcodedivide_and_conquerThe journal entry discusses the author's 4th attempt at solving a LeetCode problem related to finding the number of equal number blocks. It explains the concept of binary search and provides a code implementation using a BigArray class.
Number of Equal Numbers Blocks -- 3rd attempt
Date: 1/31/2024Tags:algorithmsleetcodedivide_and_conquerThe journal entry discusses the third attempt at solving the problem of finding the number of equal numbers blocks using a defined BigArray class and a getNextI function that returns hi + 1 in order to determine the next index for iteration.
Number of Equal Numbers Blocks -- 2nd attempt
Date: 1/30/2024Tags:algorithmsleetcodedivide_and_conquerThe journal entry is about the author's second attempt at solving the "Number of Equal Numbers Blocks" problem using a divide and conquer algorithm, and provides lessons learned during the process, as well as a code snippet implementing the algorithm using a BigArray.
Number of Equal Numbers Blocks
Date: 1/29/2024Tags:algorithmsleetcodedivide_and_conquerThe journal entry provides a solution using binary search to find the number of equal number blocks in an array, with a code example included.