Ad
  • Custom User Avatar

    Somthing you might find interesting:

    Regex.Replace(modifiedInput, "(oo)", "00", RegexOptions.IgnoreCase);
    

    can be written like:

    Regex.Replace(modifiedInput, "(?i)oo", "00");
    

    This can also be applied to a regexp group:

    Regex.Replace(modifiedInput, "(?i:foo) (bar)", "00");
    

    making only the "foo" part case insensitive.
    See for info: https://msdn.microsoft.com/en-us/library/yd1hzczs.aspx

    Hope this helps,
    Kind regards,
    Maurice

  • Custom User Avatar

    "public static BigInteger[] PowersOfTwo(int n)" is public static method with name PowersOfTwo that takes "int n" as argument and has "BigInteger[]" return type, which is array of BigInteger