Wealth Equality Algorithm Challenge
The year is 2088 and the Radical Marxist Socialist People's Party (RMSPP) has just seized power in Brazil. Their first act in power is absolute wealth equality through coercive redistribution. Create a function that redistributes all wealth equally among all citizens. Wealth is represented as an array/list where every index is the wealth of a single citizen. The function should mutate the input such that every index has the same amount of wealth. See example: Input: [5, 10, 6] >>> This represents: # citizen 1 has wealth 5 # citizen 2 has wealth 10 # citizen 3 has wealth 6 Should be after the test: [7, 7] >>> wealth has now been equally redistributed Info: MUTATE the input array/list, don't return anything Input is guaranteed to hold at least 1 citizen Wealth of a citizen will be an integer with minimum equal to 0 (negative wealth is not possible) Handling of floating point error will not be tested
A programming challenge asks the user to redistribute wealth equally among citizens after a radical socialist party seizes power in a fictional future Brazil. The joke is that the politically charged premise is presented as an ordinary coding exercise, while the example mysteriously turns [5, 10, 6] into [7, 7], losing a citizen and some wealth. It is a reaction to absurd algorithm tasks, forced equality, and simplistic political solutions. EN: A programming challenge asks the user to redistribute wealth equally among citizens after a radical socialist party seizes power in a fictional future Brazil. The joke is that the politically charged premise is presented as an ordinary coding exercise, while the example mysteriously turns [5, 10, 6] into [7, 7], losing a citizen and some wealth. It is a reaction to absurd algorithm tasks, forced equality, and simplistic political solutions.
- @right_wing_dev_squads / 5433 2022-12-02
- @right_wing_dev_squads / 6664 2023-05-07
- Type
- image
- Size
- 604×800 · 58.3 KiB
- Mood
- absurd, sarcastic
- Language
- en
- Added