## Citrix System Inc Interview Question for Developer Program Engineers

• 0
of 0 votes

Country: India
Interview Type: In-Person

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

bucket sort. Count frequency of each characters and then output in order.

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

nice

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

Perfect .

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

merge from mergesort

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

Yes. Merge sort will serve the purpose.

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

just merge part of merge sort
it is linear

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

nevermind, this question is dumb

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

bogo sort.

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

Sort both the arrays A1 and A2 separately using any sorting which guarantees nlogn time
Create an output array A3 of size A1.length+A2.length
Have 2 pointers at the end of each array, compare them (may be using ASCII) and copy the elements to the new array A3, decrement the pointer based on the comparison

sample comparison part:

``````if (A1[end1] > A2[end2])
{
A3[end3] = A1[end1];
end1--;
}
else
{
A3[end3] = A2[end2];
end2--;
}
end3--;``````

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

the solution should be no different than concatenating the two strings and sort the way you like. Maybe number of writes can be reduced

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

``````#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

bool comp(char c1, char c2)
{
return tolower(c1) < tolower(c2);
}

int main()
{
std::string str1 = "ab";
std::string str2 = "badg";
std::string str3;
str3 += str1 + str2;
std::sort(str3.begin(), str3.end(), comp);
cout << str3 << endl;

system("pause");
return 0;
}``````

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

brittney and sherri dad mom cat car

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