## Citrix System Inc Interview Question for Developer Program Engineers

• 0

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

nice

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

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

just merge part of merge sort
it is linear

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

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

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)
{
}

int main()
{
std::string str1 = "ab";
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

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.

### 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.