I have array of subdepartments in deparment. I want return string with combination of subdepartments and department.
public static string[] TestDepartments
{
get
{
return new string[]
{
"Radio-Electronic Systems and Devices in Radioelectronics and laser technologies department",
"Laser and Optic-Electronic Systems in Radioelectronics and laser technologies department",
"Optic-Electronic Devices for Scientific Research in Radioelectronics and laser technologies department",
"Theoretical Bases of Electrotechnology in Radioelectronics and laser technologies department",
"Technologies of Instrument Making in Radioelectronics and laser technologies department"
};
}
}
I need result string:
string result = "Radio-Electronic Systems and Devices, Laser and Optic-Electronic Systems, Optic-Electronic Devices for Scientific Research, Theoretical Bases of Electrotechnology, echnologies of Instrument Making in Radioelectronics and laser technologies department";
What algorithm can you recommend? Or may be exists example for find duplicate word combination in string array? In my example I need find department duplicate. I need universal method for different departments.