tannergooding
tannergooding
CC#
Created by M. Hammad on 2/28/2025 in #help
Unable to reset repeatCount variable to 0
that is, a string is already effectively a list of characters
11 replies
CC#
Created by M. Hammad on 2/28/2025 in #help
Unable to reset repeatCount variable to 0
string is already indexable, so you don't need to allocate a list at all
11 replies
CC#
Created by M. Hammad on 2/28/2025 in #help
Unable to reset repeatCount variable to 0
so to fix this, you want to always reset the repeatCount before the next iteration of the for (int i = ...) loop but you should really rename this occurrenceCount instead you should consider ways you can avoid duplicating work (avoid checking characters you've already checked, you can) you should consider if you can avoid allocating a List<char> at all (you can) and if you can avoid iterating the input more than once (you can)
11 replies
CC#
Created by M. Hammad on 2/28/2025 in #help
Unable to reset repeatCount variable to 0
that is, repeatCount starts at 0 the first iteration you encounter c, you increment the count by 1 this is greater than highestRepeatCount which is 0 so you set highestRepeatCount = 1, indexOfMostRepeated = 0, and reset repeatCount = 0 then you encounter a, you unnecessarily check c again encounter a, increment the count by 1 this is not greater than the highest, so you don't modify repeatCount then you encounter t, you unnecessarily check ca again then you encounter t and increment the count by 1 (making it 2 since it wasn't reset after checking a)
11 replies
CC#
Created by M. Hammad on 2/28/2025 in #help
Unable to reset repeatCount variable to 0
this looks like an expensive way to do the check, first of all; there are much simpler ways to handle this you also have a bug in that you're miscounting by 1 because you're starting at 0 that is given your intent cat will find c = 1, a = 1, t = 1; so you're rather finding the occurrence count; not repeat count the actual issue is, however, that you're getting c = 1, a = 1, t = 2 because repeatCount isn't reset after a
11 replies
CC#
Created by bomboclatt🎀 on 2/27/2025 in #help
✅ My Discord multitool webhook thingy broken💔
I'll close this, since it won't go anywhere else
52 replies
CC#
Created by bomboclatt🎀 on 2/27/2025 in #help
✅ My Discord multitool webhook thingy broken💔
!note 1247875332850192454 more problematic comments were found post ban
52 replies
CC#
Created by bomboclatt🎀 on 2/27/2025 in #help
✅ My Discord multitool webhook thingy broken💔
they're banned already
52 replies