using System.Collections.Generic;
public static List<string> Sort(string[] tenors) {
foreach(string tenor in tenors)
var nbFromStr = Int32.Parse(Regex.Match(tenor, @"\d+").Value);
var datePartType = tenor.Replace(nbFromStr.ToString(), "");
Console.Error.WriteLine(nbFromStr);
Console.Error.WriteLine(nbFromStr*7);
Console.Error.WriteLine(nbFromStr*30);
Console.Error.WriteLine(nbFromStr*360);
return new List<string>(){@"bar", @"hello world", @"hello world"};
public static void Main()
var sortedTenors = Sort(tenors);
Console.WriteLine("Initial : [{0}]", string.Join(", ", tenors));
Console.WriteLine("Sorted : [{0}]", string.Join(", ", sortedTenors));
string[] expectedTenors =
Console.WriteLine("Expected : [{0}]", string.Join(", ", expectedTenors));