Pergunta de entrevista da empresa Pinterest

They gave me a 4 hour timeframe and had 2 questions to answer. Questions were standard leetcode algorithms. First question: "given a list of words and a limit character length in a line, create a function that takes in the lineLength and words list and returns a collection of strings that fit the character lengths in a line. "

Resposta da entrevista

Sigiloso

1 de ago. de 2019

The platform to write my function was interesting since the format was in print and not return. If you returned the same answer instead of print, the platform would mark your answer wrong which I though was interesting. I was able to answer the first question successfully but did not finish the second question.

1