Software Engineers Interview Questions

419,775 software engineers interview questions shared by candidates

Given an array of character you must delete all the characters that got repeated 3 or more times consecutively and add " " in the end of the array for every deleted character Example "aaabbbcddddd"->"c "11 spaces "xxaaavbbbc" ->"xxvc " "xavvvarrrt"->"xaat " The problem must be solved in: O(1) memory O(n) time And you can't overwrite a cell in the array more than once
avatar

Software Development Engineer

Interviewed at Bloomberg

4
Jan 9, 2019

Given an array of character you must delete all the characters that got repeated 3 or more times consecutively and add " " in the end of the array for every deleted character Example "aaabbbcddddd"->"c "11 spaces "xxaaavbbbc" ->"xxvc " "xavvvarrrt"->"xaat " The problem must be solved in: O(1) memory O(n) time And you can't overwrite a cell in the array more than once

Brain teaser: two person have two pizza for food, but only one of them is holding the knife. One cut per pizza. Each has only one chance to have the priority to choose one slice of a pizza. It means a process of cutting, choosing, cutting choose. How many of the pizza can the one with knife get maximum?
avatar

Software Engineer

Interviewed at Bloomberg

4
Sep 8, 2010

Brain teaser: two person have two pizza for food, but only one of them is holding the knife. One cut per pizza. Each has only one chance to have the priority to choose one slice of a pizza. It means a process of cutting, choosing, cutting choose. How many of the pizza can the one with knife get maximum?

Flatten a 2D linkedList . A node contains 3 parameters namely, data , pointer to left, pointer to down . The aim of the function is to flatten the linkedlist. Ex: 1-->2-->4 | V 3 Answer is 1-->2-->3-->4 Ex: 1 --> 2--> 3--> 4 | 5-->6-->7 | | 8 9 Answer is 1-->2->5 -> 8 -> 6->9 ->7-> 3-> 4 He asked me to make the same linkedlist flatten not to create a new LinkedList or print the elements
avatar

Software Engineer

Interviewed at Bloomberg

4
Mar 6, 2015

Flatten a 2D linkedList . A node contains 3 parameters namely, data , pointer to left, pointer to down . The aim of the function is to flatten the linkedlist. Ex: 1-->2-->4 | V 3 Answer is 1-->2-->3-->4 Ex: 1 --> 2--> 3--> 4 | 5-->6-->7 | | 8 9 Answer is 1-->2->5 -> 8 -> 6->9 ->7-> 3-> 4 He asked me to make the same linkedlist flatten not to create a new LinkedList or print the elements

Viewing 2411 - 2420 interview questions

Glassdoor has 419,775 interview questions and reports from Software engineers interviews. Prepare for your interview. Get hired. Love your job.