Jump to content

Pseudocode efficency

Featured Replies

The answer I chose was B,

 

its not

 

A - because we are always taught to never make assumptions there for limiting the dataset to 100 elements is not practical what if the customer has 200, so this is not an option.

 

its not

 

D - because a language doesnt determine effiency it could be writting in lowlevel langages like assembly language or high level like java the language doesnt determine speed.

 

-------------------

 

now heres the issue C makes a little bit of sense to me because lets say our element is at location 1600 say we had 3000 elements we could start at 1500 and find the element quicker by putting the counter in the middle however I never chose it because lets says our element is 3 that means we would test the upper limits for no reason, and when i program I always pass an accessor to find the element and return it straight away thats why I chose B.

 

any thoughts if im correct?

 

x0zgub.png

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.