第 1 / 2 页
非代码面试题
显示 20 / 25 道匹配题目
答题状态:未尝试未正确已正确
ID题目领域难度题型进度权限
801Binary Query Budget for Composite State 1A hidden system state is determined by a venue among 7 choices, a regime among 4 choices, and a throttle flag among 2 choices. Each yes/no query can return one bit. What is the minimum number of yes/no queries needed to guarantee identifying the full hidden state?脑筋急转弯简单brainteaser未尝试免费806Ternary Diagnostic Rounds 1A health check returns one of three colors each round: green, amber, or red. If there are 28 possible hidden states to distinguish, what is the minimum number of rounds needed to identify the state with certainty?脑筋急转弯中等brainteaser未尝试免费811Mixed-Outcome Signature Slack 1A diagnostic protocol has answer slots with outcome counts [2, 2, 3]. If it must encode exactly 11 hidden states, how many answer signatures remain unused under a perfect injective assignment?脑筋急转弯简单brainteaser未尝试免费815Mixed-Outcome Signature Slack 5A diagnostic protocol has answer slots with outcome counts [2, 2, 2, 3]. If it must encode exactly 19 hidden states, how many answer signatures remain unused under a perfect injective assignment?脑筋急转弯简单brainteaser未尝试免费816Modulo Checksum Recovery 1A packet contains integer fields modulo 7. The published checksum says the total field sum is congruent to 4 mod 7. You observe all but one field, whose visible values are [3, 5, 6, 1]. What is the missing field value modulo 7?脑筋急转弯中等brainteaser未尝试免费818Modulo Checksum Recovery 3A packet contains integer fields modulo 11. The published checksum says the total field sum is congruent to 4 mod 11. You observe all but one field, whose visible values are [8, 6, 1, 3, 5]. What is the missing field value modulo 11?脑筋急转弯中等brainteaser未尝试免费821Signature Feasibility Check 1A protocol has answer slots with outcome counts [2, 2, 2]. Can it encode 9 hidden states injectively?脑筋急转弯简单brainteaser未尝试免费823Signature Feasibility Check 3A protocol has answer slots with outcome counts [3, 3]. Can it encode 8 hidden states injectively?脑筋急转弯中等brainteaser未尝试免费5698Twelve Coins, Unknown DirectionYou have 12 coins that look identical. Exactly one is counterfeit and has a different weight from the rest, but you do NOT know whether it is heavier or lighter. Using only a two-pan balance scale (each weighing reports left-heavy, right-heavy, or balanced), what is the minimum number of weighings that guarantees you both identify the counterfeit AND determine whether it is heavy or light? Weighings may be chosen adaptively.脑筋急转弯中等brainteaser未尝试免费5699Sorting Five With Fewest ComparisonsYou must sort 5 distinct numbers using only pairwise comparisons, each of which returns which of the two compared elements is larger. What is the information-theoretic lower bound on the worst-case number of comparisons any comparison-based sorting algorithm needs, AND is that bound actually achievable for 5 elements? Give the minimum worst-case number of comparisons that guarantees a full sort.脑筋急转弯中等brainteaser未尝试免费5700Ten Hats in a Line10 players stand in a line. Each wears a red or blue hat, assigned independently by a fair coin. Each player sees all hats in FRONT of them but not their own nor those behind. Starting from the back of the line, each player in turn announces a single guess of their own hat color, heard by everyone. They agree on a strategy beforehand (no communication after hats are placed except the public guesses). Using the optimal parity strategy, how many of the 10 players are GUARANTEED to guess correctly regardless of the hat assignment?脑筋急转弯中等brainteaser未尝试免费5701Guess the Number 1 to 1000An adversary picks a secret integer between 1 and 1000 inclusive. You may ask yes/no questions, each answered truthfully, and you may choose each question adaptively based on previous answers. What is the minimum number of questions that guarantees you can determine the secret number in the worst case?脑筋急转弯简单brainteaser未尝试免费5702One Poisoned Bottle, Binary TestersYou have 1000 bottles of wine, exactly one of which is poisoned. A tester who drinks any amount containing the poison dies after exactly the same fixed delay, and you can have each tester sip from any combination of bottles simultaneously in a single round (results observed after the delay, before the celebration). If you only get ONE round of testing, what is the minimum number of testers needed to guarantee identifying the poisoned bottle?脑筋急转弯中等brainteaser未尝试免费5703Eight Coins, One Known LighterYou have 8 visually identical coins; exactly one is counterfeit and is known to be LIGHTER than the rest. Using a two-pan balance scale (left-heavy / right-heavy / balanced per weighing), what is the minimum number of weighings that guarantees identifying the light coin in the worst case? Weighings may be adaptive.脑筋急转弯简单brainteaser未尝试免费5704Heaviest and Runner-UpYou have 8 coins of pairwise-distinct weights and a balance scale that compares two single coins and tells you which is heavier. What is the minimum number of pairwise weighings, in the worst case, needed to identify BOTH the heaviest coin and the second-heaviest coin? (This is the classic tournament problem.)脑筋急转弯中等brainteaser未尝试免费5705Prisoners and the Lightbulb Counter100 prisoners take turns, one at a time in an arbitrary order chosen by a warden, entering a room with a single lightbulb (initially OFF). Each visiting prisoner may toggle the bulb and observe its state, but cannot otherwise communicate. At any point any prisoner may declare 'every prisoner has now visited at least once'; they win only if the declaration is true. They strategize beforehand. In the standard single-counter strategy, exactly one designated counter increments a tally when he finds the bulb ON (then switches it OFF), and every other prisoner switches the bulb ON the FIRST time they find it OFF (and never again). What total count must the counter reach before he can safely declare everyone has visited?脑筋急转弯困难brainteaser未尝试面试订阅5706How Many Coins in Three Weighings (Known Heavy)Among a pile of identical-looking coins exactly one is counterfeit and is known to be HEAVIER than the others. With a two-pan balance scale (each weighing returns left-heavy, right-heavy, or balanced) and exactly 3 weighings allowed, what is the LARGEST number of coins for which you can always guarantee identifying the heavy one? Weighings may be adaptive.脑筋急转弯简单brainteaser未尝试免费5707100 Prisoners and 100 Boxes100 prisoners are numbered 1 to 100. In a room, 100 boxes each contain one slip with a distinct number 1 to 100, placed by a uniformly random permutation. Each prisoner enters alone, may open at most 50 boxes, must find the slip bearing his own number, then leaves without communicating or altering anything. All 100 must succeed for the group to win. Using the optimal strategy (each prisoner opens the box with his number, then the box whose number matches the slip just found, following the permutation cycle), the win probability equals 1 minus the sum of 1/k for k from 51 to 100. To the nearest whole percent, what is this winning probability?脑筋急转弯困难brainteaser未尝试面试订阅5708Reference Coin Boosts CapacityExactly one coin among a pile is counterfeit, with weight different from the genuine ones, but you do NOT know whether it is heavier or lighter. You also have ONE extra coin that is guaranteed genuine, which you may place on the scale freely. Using a two-pan balance (each weighing returns left-heavy, right-heavy, or balanced) with exactly 3 weighings, what is the LARGEST number of suspect coins for which you can always both identify the fake and determine its direction? Weighings may be adaptive.脑筋急转弯困难brainteaser未尝试面试订阅5709Two Light Fakes Among SixYou have 6 visually identical coins. Exactly TWO of them are counterfeit and each counterfeit weighs the same known-lighter amount (both fakes are equally light); the other four are genuine and equal. Using a two-pan balance scale (each weighing returns left-heavy, right-heavy, or balanced), what is the minimum number of weighings that guarantees identifying WHICH two coins are the light pair in the worst case? Weighings may be adaptive.脑筋急转弯困难brainteaser未尝试面试订阅