Software Developer Interview Questions | Glassdoor.co.in

Software Developer Interview Questions

17,388

Software developer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Given an integer array which consists of numbers from 1 to N with 1 number missing find the missing number. What will you do if 2 numbers are missing?

4 Answers

Design a Data Structure SpecialStack that supports all the stack operations like push(), pop(), isEmpty(), isFull() and an additional operation getMin() which should return minimum element from the SpecialStack. All these operations of SpecialStack must be O(1). To implement SpecialStack, you should only use standard Stack data structure and no other data structure like arrays, list, etc.

4 Answers

Which is more efficient for searching, linked list or array?

4 Answers

Three Programs 1. Strings 2. Array subarray concepts 3. Operators

5 Answers

You have a list of sentences/words. How to find out the sub list that consists of a specific prefix? Ex: input: prefix="he", list = ["hello", "world", "hello world", "hey dude", "galaxy"....] output: ["hello", "hello world", "hey dude"]

4 Answers

Sequence of robot moves and find circular loops in given moves sequence. sequence = "<<>>>>^v^v>><<" , < WEST,> EAST, ^ NORTH, v SOUTH. ^v this is a circular loop. find all such loops in a moves sequence.

5 Answers

Write code to count the number of bytes used for the int data type.

4 Answers

Programming related to problem solving

4 Answers

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<<5 Answers

Define Yourself

3 Answers
4150 of 17,388 Interview Questions