Qualcomm Interview Question
Software Engineer / DevelopersCountry: India
void PrintAllArangments(int Num,int *Out,int Pos,int Size)
{
if(Pos == Size)
{
for(int i = 0; i < Size; ++i)
{
cout << Out[i] << ",";
}
cout << endl;
}
else
{
for(int i = 1; i <= Num; ++i)
{
if(i <= Pos + 1)
{
Out[Pos] = i;
PrintAllArangments(Num,Out,Pos + 1,Size);
}
}
}
}
package Questions;
- bhawna May 14, 2012