Shorten.
Source Link
Mateen Ulhaq
  • 25.8k
  • 20
  • 111
  • 143

Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7.

  1. What is a simple solution?
  2. What is an effective solution to reduce memory usage or run on a slower CPU?

Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7.

  1. What is a simple solution?
  2. What is an effective solution to reduce memory usage or run on a slower CPU?

Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7.

Notice removed Reward existing answer by Emil Jeřábek
Bounty Ended with sh1's answer chosen by Emil Jeřábek
Notice added Reward existing answer by Emil Jeřábek
Bounty Started worth 100 reputation by Emil Jeřábek
edited tags; edited title
Link
ЯegDwight
  • 25k
  • 10
  • 46
  • 52

Expand a random range from 1-51–5 to 1-71–7

Question Protected by CommunityBot
Retagged homework
Link
Mateen Ulhaq
  • 25.8k
  • 20
  • 111
  • 143
edited tags
Link
Kurru
  • 14.2k
  • 18
  • 65
  • 84
Loading
added 153 characters in body; edited tags; edited title
Source Link
Roger Pate
Roger Pate
Loading
capitalization
Source Link
Ben
  • 1k
  • 1
  • 11
  • 25
Loading
Post Made Community Wiki
Rollback to Revision 6
Link
GManNickG
  • 498.9k
  • 53
  • 499
  • 548
Loading
edited tags
Link
Wouter van Nifterick
  • 23.9k
  • 7
  • 80
  • 123
Loading
edited tags
Link
James McMahon
  • 49.1k
  • 67
  • 208
  • 285
Loading
edited tags
Link
James McMahon
  • 49.1k
  • 67
  • 208
  • 285
Loading
edited tags
Link
BradC
  • 39.6k
  • 13
  • 74
  • 89
Loading
edited tags
Link
Ben Hoffstein
  • 102.7k
  • 8
  • 105
  • 121
Loading
edited tags
Link
Ben Hoffstein
  • 102.7k
  • 8
  • 105
  • 121
Loading
Source Link
praveen
  • 945
  • 3
  • 7
  • 3
Loading