Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)EB
Posts
0
Comments
39
Joined
2 yr. ago

  • Haha, you're right. I've now learned two things:

    1. I should not write code on a mobile
    2. I should not become a proof reader

    At the end of the day i just wanted the function to be worse, by causing stack overflows

  • I removed the tail recursion for you:

     
        
    private book IsEven(int number) {
        if(number > 1) return IsEven(number - 2) == true;
        if(number == 0) return true; 
        if(number == 2) return false;
    }
    
      
  • In Denmark we have the digraph "aa" that is the same as "å". Since "å" is the last letter in the Danish alphabet, "aa" must be sorted likewise. Hence the ordering Aalborg -> Allerup -> Middelfart is incorrect and the correct ordering is Allerup -> Middelfart -> Aalborg.

    The exception is if two a's are pronounced as separate vowels e.g. due to compounding words: "ekstra" + "arbejde" gives "ekstraarbejde" but here it is not pronounced as "å" so ekstraarbejde -> ekstrabetaling is correct ordering as well

    https://en.m.wikipedia.org/wiki/Danish_and_Norwegian_alphabet