csharp
public static void Main(string[] args)
{
string[] s = { "www", "ww", "wwk", "ww2" };
string[] s1 = { "www", "wwk", "ww2", "ww2" };
bool duplicated= false;
int i = 0;
while (true)
{
if (s.Contains(s1[i]))
{
int a4s = occurrence(s, s1[i]);
int a4s1 = occurrence(s1, s1[i]);
if (a4s != a4s1)
{
break;
}
else
{
if(i==s.Length-1)
{
duplicated= true;
break;
}
else{
}
i++;
}
}
else
{
break;
}
}
Console.WriteLine(duplicated);
}
public static int occurrence(string [] a, string a2)
{
int occ = 0;
for (int i = 0; i < a.Length;i++ )
{
if(a[i].Equals(a2))
{
occ++;
}
}
return occ;
}
}
am beginner like u

please have a look at it carefully;
hope that help to get the idea;
Please use code tags when posting your code =>
This post has been edited by PsychoCoder: 4 Mar, 2008 - 06:08 AM