ShmoopTube

Where Monty Python meets your 10th grade teacher.

Search Thousands of Shmoop Videos

AP Computer Science 2.4 Standard Algorithms 167 Views


Share It!


Description:

AP Computer Science 2.4 Standard Algorithms. What is the quickest possible combination of search and sort methods to find a single sheep, shear him, and resort the group?

Language:
English Language

Transcript

00:00

Thank you We sneak And here's your shmoop du jour

00:06

brought to you by christmas celebrating sheep fleeced nobby not

00:14

question four uses the same sordid sheep from question three

00:19

sorted not sorted All right now that are sheep from

00:23

questions for your safely sorted by increasing wool density we'd

00:27

like to be able to tell them apart Well after

00:29

all they're here for a reason and it be kind

00:31

of insensitive to confuse them with one another what's the

00:33

quickest possible combination of search and sort methods to find

00:37

a single sheep shear him and re sort the group

00:42

our energy Right now this problem takes a bit of

00:46

intuition You you will stop Remember that our sheep are

00:52

already sorted when comparing our to search algorithms binary and

00:56

sequential khun see the binaries much faster however only works

01:01

with sordid data which we thankfully have so we can

01:04

narrow our choices down to b c and e This

01:07

is where we need to know our stuff Yeah Looking

01:15

closely we can observe that the sheep were sorted by

01:18

increasing wool density and question three since they're sorted by

01:22

increasing value and only one sheep is out of order

01:26

Insertion sort is super effective insertion sort So our answer

01:31

is b Next time we take you on a tour

01:35

of the shmoop sheep farm But we're a bunch of 00:01:37.213 --> [endTime] cheapskates

Related Videos

AP Computer Science 1.2 GridWorld Case Study and APIs
493 Views

AP Computer Science 1.2 GridWorld Case Study and APIs. What is the direction of the actor?

AP Computer Science 1.4 Standard Algorithms
200 Views

AP Computer Science 1.4 Standard Algorithms. How many times will mystery be called for mystery(n) for n > 1?

AP Computer Science 2.3 Classes and Objects
191 Views

AP Computer Science 2.3 Classes and Objects. Which of the following is correct implementation of the Country class?

AP Computer Science 3.4 Inheritance, Abstraction, and Polymorphism
204 Views

AP Computer Science 3.4 Inheritance, Abstraction, and Polymorphism. Which of the following will satisfy the conditional if statement for boo, str,...

AP Computer Science 4.2 Standard Algorithms
191 Views

AP Computer Science 4.2 Standard Algorithms. What kind of algorithm is the following?