This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Problem: | |
// For two sorted arrays A and B and index k find an element on k-th position for merged | |
// A+B array (sorting preserved). | |
// Limitations: | |
// - Complexiti is lower than O(n) | |
// - No memory allocation | |
// - Input data can't be modified. | |
// | |
// Proposed solution: | |
// For index i in A and index j in B such that i + j == k move indexes by half of their |