Development Engineer Interview Questions

37,444 development engineer interview questions shared by candidates

Imagine you have a string and you want to return False if there are repeat characters in this string, what are the fastest and most space efficient ways to do this. (I clarified and he only wanted to return False if there was a repeat letter or number)
avatar

Software Development Engineer Intern

Interviewed at Microsoft

4
Nov 7, 2014

Imagine you have a string and you want to return False if there are repeat characters in this string, what are the fastest and most space efficient ways to do this. (I clarified and he only wanted to return False if there was a repeat letter or number)

1st question : 210 points. Write a program to simulate a keyboard with given keys and their operation. You need to print the final text to STDOUT. Type of Keys: Each key affects the movement of the cursor on editor. The cursor position is identified by row and column. alpha numeric space => this key inserts their respective symbol at cursors position and shift cursor. @ => [CAPS Lock] toggles caps lock, i.e., if CapsLock is 'ON' after this key press it will be 'OFF' and vice versa. Initially CAPS Lock in 'OFF'. # => [ENTER/New Line] inserts a new line character at cursor position and shift cursor position. < => [LEFT arrow] moves cursor to one step left (if available). If cursor is at the starting of the row, it moves to end of the row above (if available). > => [RIGHT arrow] moves cursor to one step right (if available). If cursor is at a row end it moves to starting of the row below (if available). / => [Backspace] deletes one character from the left of the cursor and move cursor one step left. It follows same direction rules as LEFT arrow key (<). ? => [Down arrow] If cursor is on last row nothing changes. The cursor moves to original column in next row if there are not enough characters in next row, cursor shifts to the end of the new row. Note: If key is pressed continuosly original column will not change with every key press. ^ => [UP arrow] If cursor is on first row nothing changes. The cursor moves to the original column (current) of the previous row, if there are not enough characters in previous row cursor shifts to the end of the previous row. Note: If key is pressed continuosly original column will not change with every key press. Example: Input: asdf#q#pqr^^23 Output: asd23f q pqr Input: One line of input characters (as defined above). Output: The formatted text. Example 1: Input asdf1# @qwe^23 Output asdf231 QWE Example 2: Input asdf1#@ qwe<<<//23 Output asdf123QWE Explanation: asdf1 prints asdf1 asdf1 # inserts new line character after asdf1 @ qwe switches caps lock from off to on and inserts QWE asdf1 QWE <<< shifts cursor position 3 position left // deletes 2 character (space and new line) from left of Q character asdf1QWE 23 inserts 23 from current cursor position asdf123QWE
avatar

Software Development Engineer

Interviewed at Smartprix

3.4
Aug 20, 2017

1st question : 210 points. Write a program to simulate a keyboard with given keys and their operation. You need to print the final text to STDOUT. Type of Keys: Each key affects the movement of the cursor on editor. The cursor position is identified by row and column. alpha numeric space => this key inserts their respective symbol at cursors position and shift cursor. @ => [CAPS Lock] toggles caps lock, i.e., if CapsLock is 'ON' after this key press it will be 'OFF' and vice versa. Initially CAPS Lock in 'OFF'. # => [ENTER/New Line] inserts a new line character at cursor position and shift cursor position. < => [LEFT arrow] moves cursor to one step left (if available). If cursor is at the starting of the row, it moves to end of the row above (if available). > => [RIGHT arrow] moves cursor to one step right (if available). If cursor is at a row end it moves to starting of the row below (if available). / => [Backspace] deletes one character from the left of the cursor and move cursor one step left. It follows same direction rules as LEFT arrow key (<). ? => [Down arrow] If cursor is on last row nothing changes. The cursor moves to original column in next row if there are not enough characters in next row, cursor shifts to the end of the new row. Note: If key is pressed continuosly original column will not change with every key press. ^ => [UP arrow] If cursor is on first row nothing changes. The cursor moves to the original column (current) of the previous row, if there are not enough characters in previous row cursor shifts to the end of the previous row. Note: If key is pressed continuosly original column will not change with every key press. Example: Input: asdf#q#pqr^^23 Output: asd23f q pqr Input: One line of input characters (as defined above). Output: The formatted text. Example 1: Input asdf1# @qwe^23 Output asdf231 QWE Example 2: Input asdf1#@ qwe<<<//23 Output asdf123QWE Explanation: asdf1 prints asdf1 asdf1 # inserts new line character after asdf1 @ qwe switches caps lock from off to on and inserts QWE asdf1 QWE <<< shifts cursor position 3 position left // deletes 2 character (space and new line) from left of Q character asdf1QWE 23 inserts 23 from current cursor position asdf123QWE

Viewing 221 - 230 interview questions

Glassdoor has 37,444 interview questions and reports from Development engineer interviews. Prepare for your interview. Get hired. Love your job.