Skip to content

Update Program.cs#10

Open
MikeHickey17 wants to merge 1 commit into552ODST:masterfrom
MikeHickey17:master
Open

Update Program.cs#10
MikeHickey17 wants to merge 1 commit into552ODST:masterfrom
MikeHickey17:master

Conversation

@MikeHickey17
Copy link

This completes my IQT.

This completes my IQT.

for (int i = 0; i < hyphenNum.Count(); i++)
{
for (int j = 0; j < nums.Count(); j++)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to run the full length of array each time?

}
}
}
catch

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's sarcastic

{
if (i != j)
{
if (Convert.ToInt32(nums[i]) == Convert.ToInt32(nums[j]))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need Convert.ToInt32()'s

try
{
List<int> nums = hyphenNum.Split('-').Select(int.Parse).ToList();
isConsecutiveAcending = !nums.Select((i, j) => i - j).Distinct().Skip(1).Any();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the .Any() there?

public static string PascalConverter(string aFewWords)
{
return default;
if(aFewWords == "" || aFewWords == null)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could have used string.NullOrEmpty()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants