Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,714 members, 7,955,688 topics. Date: Sunday, 22 September 2024 at 12:51 PM |
Nairaland Forum / Science/Technology / Programming / Another Programming Challenge (2241 Views)
Programming Challenge For Beginners Competition Two N20000 -SEASON 2- / Programming Challenge For Beginners N20000 / Facebook Programming Challenge Question (2) (3) (4)
Re: Another Programming Challenge by mkwayisi: 5:32pm On Sep 29, 2012 |
@lordZouga: Once will never be enough unless you're coming up with a breakthrough algorithm. Let me ask, have you tried implementing what you're thinking? If not try it! |
Re: Another Programming Challenge by ektbear: 7:30pm On Sep 29, 2012 |
₱®ÌИСΞ: Indeed, if N is big, and K relatively small, then this is pretty unlikely to happen. This was the subtle issue I alluded to in my first post. But it is pretty easy to fix (just reject a random number it is already in your list). |
Re: Another Programming Challenge by ektbear: 7:31pm On Sep 29, 2012 |
lordZOUGA: If you don't know N, I think that it is impossible to do it in one pass. You have to know N to generate the K random row #s correctly. And the only way to know N is to pass through the file once. |
Re: Another Programming Challenge by uzoexcel(m): 5:22pm On Jul 18, 2014 |
OFDM? |
Are Nigerian Web Devs Scared Of Java? / SMS Gateway For Implementing OTP / Please, I Need A Step-by-step Tutorial For Developing Android Apps
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 8 |