@@ -12,7 +12,6 @@ public static class Permutations
12
12
/// <summary>
13
13
/// Private Helper. Computes permutations recursively for string source.
14
14
/// </summary>
15
- /// <param name="s">S.</param>
16
15
private static HashSet < string > _permutations ( string source )
17
16
{
18
17
var perms = new HashSet < string > ( ) ;
@@ -56,9 +55,9 @@ private static HashSet<string> _mergePermutations(HashSet<string> permutations,
56
55
/// <summary>
57
56
/// Computes the permutations of a string.
58
57
/// </summary>
59
- public static HashSet < string > ComputeDistinct ( string Source )
58
+ public static HashSet < string > ComputeDistinct ( string source )
60
59
{
61
- return _permutations ( Source ) ;
60
+ return _permutations ( source ) ;
62
61
}
63
62
64
63
/// <summary>
@@ -68,13 +67,13 @@ public static bool IsAnargram(string source, string other)
68
67
{
69
68
if ( string . IsNullOrEmpty ( source ) || string . IsNullOrEmpty ( other ) )
70
69
return false ;
71
- else if ( source . Length != other . Length )
70
+ if ( source . Length != other . Length )
72
71
return false ;
73
- else if ( source . Equals ( other , StringComparison . Ordinal ) )
72
+ if ( source . Equals ( other , StringComparison . Ordinal ) )
74
73
return true ;
75
74
76
75
int len = source . Length ;
77
- // Hash set which will contains all the characters present in input souce .
76
+ // Hash set which will contains all the characters present in input source .
78
77
var hashSetSourceChars = new HashSet < char > ( ) ;
79
78
var hashSetOtherChars = new HashSet < char > ( ) ;
80
79
for ( int i = 0 ; i < len ; i ++ )
0 commit comments