PocketPixie
PocketPixie
CC#
Created by PocketPixie on 10/19/2024 in #help
Where is the letter of the array saved?
Thank you for the answer, Task. It does make sense once the
d
d
or
D
D
is counted for after iterating through the string. So the ans is acting as a counting mechanism for how many times the above shows up.
7 replies
CC#
Created by PocketPixie on 11/27/2023 in #help
Help with this coding problem.
I thought I would have to cast the array as an integer first, then back return as an array
15 replies
CC#
Created by PocketPixie on 11/27/2023 in #help
Help with this coding problem.
Thanks
15 replies
CC#
Created by PocketPixie on 11/27/2023 in #help
Help with this coding problem.
The Convert.ToInt32 isn't giving me any errors, but I am attempting to have it where the numbers when divided by 2 come out as even, else they come out as odd. It requires that i have a return as an array though
15 replies
CC#
Created by PocketPixie on 11/27/2023 in #help
Help with this coding problem.
public class Solution {
public int[] SortArrayByParityII(int[] nums) {
int n = Convert.ToInt32(nums);
if(n % 2 == 0)
{
Console.WriteLine(n);
}
else
{
Console.WriteLine(n);
}
return int[] result = n.ToString().Select(o=> Convert.ToInt32(n)).ToArray();
}
}
public class Solution {
public int[] SortArrayByParityII(int[] nums) {
int n = Convert.ToInt32(nums);
if(n % 2 == 0)
{
Console.WriteLine(n);
}
else
{
Console.WriteLine(n);
}
return int[] result = n.ToString().Select(o=> Convert.ToInt32(n)).ToArray();
}
}
it's still not converting even with the above code
15 replies
CC#
Created by PocketPixie on 11/27/2023 in #help
Help with this coding problem.
Oh, thank you
15 replies