Libraryless. Click here for Pure Java version (895L/7K/20K).
!752 static Class mainBot; answer { if (match("which bot is the biggest", s)) { Map<S, Class> botsByID = cast get(mainBot, "botsByID"); new Map<S, Long> map; for (S id : keys(botsByID)) { Class bot = botsByID.get(id); new IdentityHashMap seen; seen.put(mainBot, true); seen.put(getJavaX(), true); // any more to put here? long size = dataSize(bot, seen); map.put(id, size); } S winner = keyWithBiggestValue(map); ret format3("The fattest bot is: * with an in-memory size of * bytes", winner, map.get(winner)); } }
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1002039 |
| Snippet name: | Which bot is the biggest? (buggy-ish) |
| Eternal ID of this version: | #1002039/1 |
| Text MD5: | 833baae5f521e1909c02b101917cd5fb |
| Transpilation MD5: | 69b1a74f65b12685f6256ca3df8e2228 |
| Author: | stefan |
| Category: | |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-02-02 16:39:58 |
| Source code size: | 621 bytes / 23 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 949 / 1716 |
| Referenced in: | #1002584 - Program Data Sizes (on disk) #3000177 - Answer for stefanreich #3000202 - Answer for stefanreich (>> T conversion bot) #3000238 - Answer for stefanreich (>> t power bot) #3000382 - Answer for ferdie (>> t = 1, f = 0) |