Innova Solutions Usa Interview Questions

Innova Solutions Usa Interview Guides

Click or hover over a slice to explore questions for that topic.
Data Structures & Algorithms
(88)
SQL
(68)
Machine Learning
(67)
Probability
(31)
Statistics
(23)

Innova Solutions Usa Interview Questions

Practice for the Innova Solutions Usa interview with these recently asked interview questions.

QuestionTopicDifficulty
Design Patterns
Easy

You have been tasked with designing three classes: text_editor, moving_text_editor, and smart_text_editor. These classes are to be created with specific functionalities as defined below:

  1. text_editor class:

    • write_line(string:str): A method which appends a given string to the end of the existing string.
    • delete_line(char_num : int): A method which deletes char_num number of characters from the existing string, starting from the end. If there are no characters left, the method should do nothing.
    • special_operation(): A method which currently does nothing.
    • get_notes(): A method which returns the internal string.
  2. moving_text_editor class:

    • This class extends text_editor. The special_operation() method is overridden. Initially, the cursor will be at the end of the current string. If special_operation() is called, it moves the cursor to the beginning of the string, any additional appends will be appended to the beginning of the string instead. Calling special_operation() again reverses the cursor operation.
  3. smart_text_editor class:

    • This class extends text_editor. In this class, the special_operation() method is overridden to serve as an undo operation, allowing it to undo an infinite number of operations.

Input

[['special_text_editor'], ['write_line', 'special_operation', 'write_line'], ['World', 'Hello, ']]

Output

"Hello, World"

Behavioral
Medium
SQL
Easy
Loading pricing options

View all Innova Solutions Usa questions

Challenge

Check your skills...
How prepared are you for working at Innova Solutions Usa?

Discussion & Interview Experiences

?
There are no comments yet. Start the conversation by leaving a comment.