String - Permutation combination

Posted by Murugavelmsc under Interview Questions on 4/4/2013 | Points: 10 | Views : 1431 | Status : [Member] | Replies : 2
Hi Experts,

Permutation combination

Input:

String str="car";

Ouptut:

c
ca
car

a
ar
arc

r
ra
rac

Thanks,
Murugavel S

Regards,
Murugavel S
murugavel.sadagopan@gmail.com
http://murugavelmsc.blogspot.in/



Responses

Posted by: Jayakumars on: 4/4/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

try this Car Solution Completed


static void Main(string[] args)
{
string str = "car";
string tot = "";
for (int i = 0; i < str.Length; i++)
{
tot = tot+ str[i].ToString();
Console.WriteLine(tot);
}
Console.Out.Flush();
var name = Console.ReadLine();
}

Mark as Answer if its helpful to you

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Murugavelmsc on: 4/4/2013 [Member] Starter | Points: 25

Up
0
Down
Hi kumar,

Did u see my output that i mentioned in the question?.

Thanks,
Murugavel S


Regards,
Murugavel S
murugavel.sadagopan@gmail.com
http://murugavelmsc.blogspot.in/

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response