Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,208,979 members, 8,004,504 topics. Date: Saturday, 16 November 2024 at 05:56 PM |
Nairaland Forum / Science/Technology / Programming / Simple Algorithm Challenge (2094 Views)
Simple Algorithm Exercise / Simple Algorithm Implementation / Pls Programmers Help With Similarities Of Pseudocode & Algorithm (2) (3) (4)
Simple Algorithm Challenge by Slyr0x: 9:07pm On May 15, 2016 |
Taye and Kenny were in class. They both tried to describe a man that was once sick. Taye said "The man had a cold." Kenny said "The man had had a cold." According to English grammar, Kenny was correct. Now imagine their two teachers, Seun and Tony: Tony was a little off, and said that "Taye, while Kenny had had 'had had', had had 'had'; 'had' had had the better grammar." Seun corrected him, saying "Kenny, while Taye had had 'had', had had 'had had'; 'had had' had had the better grammar." Continuing this pattern, the knowledgeable supervisor would note that "Seun, while Tony had had 'had had had had had had had had had had', had had 'had had had had had had had had had had had'; 'had had had had had had had had had had had' had had the better grammar." Continuing this, how many 'had's would be in the incorrect 100th iteration? |
Re: Simple Algorithm Challenge by Nobody: 9:11pm On May 15, 2016 |
Slyr0x: Good evening, please is algorithm further math topic? I saw programmers needed it been looking for a way to learn it from basic to advanced but I don't know where to start cause I don't know if it is further maths or computer science topic or whatever |
Re: Simple Algorithm Challenge by Nobody: 9:38pm On May 15, 2016 |
This one hard like concrete. |
Re: Simple Algorithm Challenge by Nobody: 9:44pm On May 15, 2016 |
Sugarhugs: algoritm to my understanding is simply a step by step way of instructing a computer to accomplish a task. on the hand, algorithm analyses is the one that has to do with maths (logarithms, calculus etc). oga dhtml18 come and shade some more light. |
Re: Simple Algorithm Challenge by Nobody: 9:55pm On May 15, 2016 |
crotonite: Confused, so should I learn logarithm and calculus first? |
Re: Simple Algorithm Challenge by omoelu1(m): 10:06pm On May 15, 2016 |
Ol' boy, this question is hard hard 'hard' hard hard. I'm lost cc danielthegeek, dhtml18 |
Re: Simple Algorithm Challenge by tr3y(m): 10:16pm On May 15, 2016 |
Looks like nonsense to me... |
Re: Simple Algorithm Challenge by Nobody: 10:18pm On May 15, 2016 |
Slyr0x: I will use for loop from one to hundreds . This is easy but very technical . |
Re: Simple Algorithm Challenge by Nobody: 10:28pm On May 15, 2016 |
Sugarhugs:Not really. you shld start with: sort algorithms, search agorithms, abstract data types (i.e stacks, lists, trees, queues etc). that shld be ok. |
Re: Simple Algorithm Challenge by teampregar(m): 6:02pm On May 17, 2016 |
Slyr0x: With want i understood by your story this is the number of hads: <?php $txt = 'Seun, while Tony had had blah blah ...'; //split txt into and array $sHADS = split($txt," " ); //remove the first three words to get number of hads $num = count($sHADs) - 3; $getHads = 1; //start loop condition from the last HAD word while($num <= 100) $getHads += $num++; //when loop is complete echo "Number of Had's is : " . $getHads - 1 ; ?> |
Re: Simple Algorithm Challenge by teampregar(m): 8:20pm On May 17, 2016 |
Ah ah nobody fit contribute again, we really have programmers in nigeria indeed |
Re: Simple Algorithm Challenge by larisoft: 7:49am On May 18, 2016 |
teampregar: My dear, your algorithm will be correct only if the number of 'hads' increases arithmetically after each correction. Unfortunately, it doesnt. the first no of 'had' occured once. The second twice. The third 10. The fourth 11. The fourth 38. Find the constant between these numbers and the algorithm is solved. And there are great coders in Nigeria(though very few) . But algorithms are not just about rushing to your keyboard to type. Its about 1. Understanding the problem (so that you can solve it if you had all the time and no computer) 2. Understanding its domain (what other problems like this have already been solved?) 3. implementing a solution Source (Skienna, the Algorithm Designs Manual). The major obstacle in solving this is the first step. which is not even computer-science based - not whether we have great coders or not. @Op, can you please explain the grammar rule here? |
Re: Simple Algorithm Challenge by jacob05(m): 8:03am On May 18, 2016 |
Slyr0x: does the iteration starts from the teachers or the students? |
Re: Simple Algorithm Challenge by teampregar(m): 6:13pm On May 19, 2016 |
larisoft: Nice advice i will check awt that Skienna Design Stuff Dnt blame me tho i am just a 16 year old developer with 1 year php experience 1 Like |
Re: Simple Algorithm Challenge by teampregar(m): 6:14pm On May 19, 2016 |
larisoft: Thanks for ur advice i will check awt that Skienna Algorithm Design Stuff Dnt blame me tho i am just a 16 year old programmer with 1 year programming experience 1 Like |
Re: Simple Algorithm Challenge by Nobody: 9:32pm On May 20, 2016 |
teampregar: the op is forming blackhat... |
(1) (Reply)
Please Rate My Portfolio Website / Caeser Cipher / PHP Developers, How True Is This Statements.
(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. 37 |