Pergunta de entrevista da empresa Lenovo

Technical Coding Questions: 1. Reverse a string in place along with the complexities 2. Given an array with numbers arranged in increasing order, find the position of the given query number. Draw the recursion tree if done by binary search.

Resposta da entrevista

Sigiloso

7 de jul. de 2024

1. Two pointer approach - start from first and last characters simultaneously and keep swapping the characters until these pointer cross each other. 2. Simply apply Binary Search