This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool candiesThrownGotChocolateBar=false, bool candyBoxBoxOpened=false, bool castleBigRoomHovenHappy=true, bool castleRoom2LitFire=false, bool castleRoom2TookObject=false, bool castleTowerFirstVisitDone=true, bool castleTowerPStoneDone=true, bool castleTowerLStoneDone=false, bool castleTowerAStoneDone=false, bool castleTowerYStoneDone=false, bool castleTowerTookTalkingCandy=false, bool castleKilledNougatMonster=true, bool cellarDone=true, bool dragonDone=true, bool dragonUnlockedCyclops=true, bool forgeFoundLollipop=true, bool forgeBoughtWoodenSword=true, bool forgeBoughtIronAxe=true, bool forgeBoughtPolishedSilverSword=true, bool forgeBoughtLightweightBodyArmour=true, bool forgeBoughtScythe=false, bool fortressRoom1ChestFound=true, bool fortressRoom3ChestFound=true, bool fourthHouseFoundLollipopOnCupboard=true, bool gameDebug=false, bool gameInvertedColors=false, bool lighthousePuzzleDone=false, bool lollipopFarmPlant1LollipopButtonUnlocked=true, bool lollipopFarmPlant10LollipopsButtonUnlocked=true, bool loll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
number = 257 | |
def power_of_2?(number) | |
return true if number == 1 | |
return false if number == 0 || number % 2 != 0 | |
power_of_2?(number / 2) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Receita do Macarrão ao Alho e Óleo | |
Estou supondo será para 1 pessoa (você). | |
Ingredientes: | |
- spaghetti (o tanto que vc irá achar que dá conta de comer) | |
- azeite (eu uso o azeite comum. se vc quiser usar outros azeites diferentes fique à vontade) | |
- 12 dentes de alho fatiados bem fininhos (se achar que é muito alho, diminua a quantidade) | |
- pimenta caiena (não vou colocar a quantidade pq eu não sei se vc gosta muito de pimenta) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun twoSum(list: List<Int>, target: Int) : IntArray { | |
val sortedList = list.sorted() | |
var left = 0 | |
var right = sortedList.size - 1 | |
while (left < right) { | |
val sum = sortedList[left] + sortedList[right] | |
when { | |
sum == target -> return intArrayOf(left, right) |