[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
The Apgar Medical group keeps a patient file for each doctor
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /wsr/ - Worksafe Requests

Thread replies: 12
Thread images: 2
File: Logicprogramming.jpg (40 KB, 450x382) Image search: [Google]
Logicprogramming.jpg
40 KB, 450x382
The Apgar Medical group keeps a patient file for each doctor in the office. Each
record contains the patient’s first and last name, home address, and birth year. The
records are sorted in ascending birth year order. Two doctors, Dr. Best and Dr.
Cushing, have formed a partnership.

Design the logic that produces a merged list of patients’ names in ascending
order by birth year.

Helpz. He wants the answer written in pseudocode.
>>
>>146993
use the mergesort algorithm
>>
File: Untitled.jpg (369 KB, 1920x1080) Image search: [Google]
Untitled.jpg
369 KB, 1920x1080
Example of his pseudocode style.
>>
>>146997
No mention of a mergesort algorithm
>>
>>147003
For god's sake.

i=0;j=0;k=0;
while(){c[k++]=(a[i]<b[j])?a[i++]:b[j++];
if(i>len[a]||j>len[b]) break;}
if (i<len[a]) append_rest_of_a_to_c;
if (j<len[b]) append_rest_of_b_to_c;
>>
>>147008
Thanks for trying to help but unfortunately that is too advanced for my class.
>>
>>147022
t h e f u c k ?
h
e
f
u
c
k
?
>>
>>147027
literally look at my screenshot... everything is to be written like that.
>>
>>146993
you kidding right? using that pic you posted all you need to do is replace all the variables with the ones in the example.
>>
>>147054
meh. Thanks anyway brother. I'm assuming that would help but I've had no time to read my textbook and honestly I'm just not in a great state of mind. I'm taking 2 math classes+a biological science+this programming logic course in a 10 week period. It was a huge mistake.
>>
>>147054
Well, to be fair, he does need to know what a postincrement operator and a ternary operator do.

But now he can google them.
>>
>>147069
you are right
Thread replies: 12
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.