Softwareentwickler Php Interview Questions

512,001 softwareentwickler php interview questions shared by candidates

Given an input string S write a function which returns true if it satisfies S = nT. Basically you have to find if a given string can be represented from a substring by iterating it “n” times. n >= 2 An example would suffice – Function should return true if 1) S = “abab” 2) S = “abcdabcd” 3) S = “abcabcabc” 4) S = “zzxzzxzzx” Function should return false if 1) S = “abac” 2) S = “abcdabbd” 3) S = “abcabcefg” 4) S = “zzxzzyzzx” It would be easy to understand if you can give an algo instead of saying use kmp or suffix tree or… I came up with O(n*n) solution. Wondered how to do in O(n)
avatar

Software Engineer

Interviewed at Google

4.4
Mar 19, 2014

Given an input string S write a function which returns true if it satisfies S = nT. Basically you have to find if a given string can be represented from a substring by iterating it “n” times. n >= 2 An example would suffice – Function should return true if 1) S = “abab” 2) S = “abcdabcd” 3) S = “abcabcabc” 4) S = “zzxzzxzzx” Function should return false if 1) S = “abac” 2) S = “abcdabbd” 3) S = “abcabcefg” 4) S = “zzxzzyzzx” It would be easy to understand if you can give an algo instead of saying use kmp or suffix tree or… I came up with O(n*n) solution. Wondered how to do in O(n)

In front of you are three light switches. Only one does anything, and it turns on the light downstairs. From here you can't see the light, and it makes no sound. You must determine which switch operates the light, BUT you can only go check it once. How do you figure out which switch is for the light?
avatar

Software Engineer

Interviewed at RTX

3.8
Mar 12, 2010

In front of you are three light switches. Only one does anything, and it turns on the light downstairs. From here you can't see the light, and it makes no sound. You must determine which switch operates the light, BUT you can only go check it once. How do you figure out which switch is for the light?

Given the list of points of the skyline of a city in order (from East to West) Find the maximal rectangle contained in this skyline. I was asked to write the code. I managed to find the algorithm but was not sufficient.
avatar

Software Engineer

Interviewed at Google

4.4
Dec 4, 2009

Given the list of points of the skyline of a city in order (from East to West) Find the maximal rectangle contained in this skyline. I was asked to write the code. I managed to find the algorithm but was not sufficient.

Viewing 21 - 30 interview questions

Glassdoor has 512,001 interview questions and reports from Softwareentwickler php interviews. Prepare for your interview. Get hired. Love your job.