Software Development Engineer Interview Questions

33,176 software development engineer interview questions shared by candidates

given a linked list which has two types of pointers, a normal next pointer which points to next element in the list and random pointer which points to random element in the list. Question was to clone this linked list
Sep 26, 2012

given a linked list which has two types of pointers, a normal next pointer which points to next element in the list and random pointer which points to random element in the list. Question was to clone this linked list

Write the algorithm for this: If you have a string aaabbc the output should be a3b2c1, for the string aabcc the output should be a2b1c2 and so on. You should not allocate memory for a new string and you can do this only by reading each character once. Ps: if the result is bigger than the original string (like abc -> a1b1c1) just return null or some message that makes that clear.
Oct 28, 2013

Write the algorithm for this: If you have a string aaabbc the output should be a3b2c1, for the string aabcc the output should be a2b1c2 and so on. You should not allocate memory for a new string and you can do this only by reading each character once. Ps: if the result is bigger than the original string (like abc -> a1b1c1) just return null or some message that makes that clear.

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

Viewing 401 - 410 interview questions

Glassdoor has 33,176 interview questions and reports from Software development engineer interviews. Prepare for your interview. Get hired. Love your job.