Bazaarvoice Interview Question for Senior Software Development Engineers


Team: Platform and Products
Country: United States
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
0
of 0 vote

I don't understand your question. Can you please describe in detail?

- Anonymous January 16, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

I think it means to treat the input array as a number (123), add 1 to it, then output the result (124) as an array again. So it gets interesting when the input is [9,9,9]

- Sunny January 16, 2014 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

I think this is very intuitive . We have to go through all the elements and then increment each element by 1 until we either reach an element which is less than or equal to eight or the first element if we reach the first element we have to shift the whole array right and add 1 in starting.

int[] incerement(int a[]){
		for(int i = a.length-1;i>0;i--){
			if(a[i]<=8)
			{
				a[i]++;
				break;
			}
			else
			{
				a[i]=0
			}
		}
		if(i==0&&a[i]==0)
		{
			b=new int[a.length+1];
			b[0]=1;
			return b;
		}
		return a;
	
	}

- vidit January 17, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Python solution:

def incrementNum(nums):
    numStr = ""
    for num in nums:
        numStr.append(str(num))
    return list(str(int(numStr) + 1 ))

- coderL February 16, 2017 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More