Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

2.3.1 a

QuestionAnswer
Systemic approach to problem–solving reaching a solution by identifying the individual steps required; by creating a set or rules, an algorithm that is followed precisely will lead to an answer
Systemic approach to problem–solving steps 1. Break the problem down 2. Use abstraction 3. Consider relevant data structures 4. Tackle each part of the program step by step
Comparing Different Algorithms ALWAYS USE WORST-TIME WHEN COMPARING (but also need to know best + average)
Bubble sort time complexity Best: O(n) Average: O(n^2) Worst: O(n^2)
Bubble sort space complexity O(1)
Insertion sort time complexity Best: O(n) Average: O(n^2) Worst: O(n^2)
Insertion sort space complexity O(1)
Merge sort time complexity Best: O(n log n) Average: O(n log n) Worst: O(n log n)
Merge sort space complexity O(n)
Quicksort time complexity Best: O(n log n) Average: O(n log n) Worst: O(n^2)
Quicksort space complexity O(log n)
Linear search/serial search time complexity Best: O(1) Average: O(n) Worst: O(n)
Binary search time complexity (array) Best: O(1) Average: O(logn) Worst: O(logn)
Binary search time complexity (binary search tree) Best: O(1) Average: O(logn) Worst: O(n)
Hashing (search) time complexity Best: O(1) Average: O(1) Worst: O(n)
Breadth/depth first search time complexity Best: O(1) Average: O(V+E) Vertices + Edges O(V^2)
Adding items to structures O(1)
Generating hash value O(1) (in overflow) O(n)
Binary tree (searching/inserting) O(log n)
Binary tree (traversing) O(n)
Time complexity how long it takes to run
Space complexity how much storage is taken up
Big O notation expresses the time or space complexity, although we will be talking about time on this page. It always assumes the worst-case scenario
Big O notation rules Remove all terms except the one with the largest factor or exponent Remove any constants
If a program has complexity 5+3n+1, then 5+3n+1 turns to 3n 3n turns to n (which you then surround by O, leading to O(n))
If a program overall is O(1)+O(n)+O(n2), then O(1)+O(n)+O(n2) turns to O(n2)
Classifications in Big O notation (good to bad) 1. Constant 2. Logarithmatic 3. Linear 4. Polynomial 5. Exponential
Constant (big o notation) O(1) Always executes in the same amount of time No loops
Logarithmatic (big o notation) O(log n) Halves the data set in each pass (opposite to exponential) Halving a data set
Linear (big o notation) O(n) Performance declines as the data set grows For/while loop
Polynomial (big o notation) O(n^2) Performance is proportional to the square of the size of the data set Nested loops (if 2 loops, then square n, if 3 cube it and so on)
Exponential (big o notation) O(2^n) Doubles with each addition to the data set in each pass (opposite to logarithmic) Recursive (calls itself twice)
Created by: FlashCardFun!
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards