Tracking keyword rankings in SEO Fundamentals - Time & Space Complexity
When tracking keyword rankings, it's important to understand how the time needed grows as you check more keywords or websites.
We want to know how the work increases when the number of keywords or pages grows.
Analyze the time complexity of the following code snippet.
// Pseudocode for tracking keyword rankings
for each keyword in keywordList:
for each website in websiteList:
check ranking position of keyword on website
store result
This code checks the ranking position of each keyword on every website and saves the results.
Identify the loops, recursion, array traversals that repeat.
- Primary operation: Checking the ranking position for each keyword on each website.
- How many times: The inner check runs once for every keyword and every website, so total checks equal keywords multiplied by websites.
As you add more keywords or websites, the total checks grow by multiplying these numbers.
| Input Size (keywords x websites) | Approx. Operations |
|---|---|
| 10 x 5 | 50 checks |
| 100 x 5 | 500 checks |
| 100 x 100 | 10,000 checks |
Pattern observation: Doubling either keywords or websites doubles the total work, so the growth is proportional to both.
Time Complexity: O(n * m)
This means the time needed grows proportionally to the number of keywords times the number of websites checked.
[X] Wrong: "Checking more keywords only adds a little extra time because each check is fast."
[OK] Correct: Each keyword must be checked on every website, so adding keywords multiplies the total checks, increasing time significantly.
Understanding how time grows when tracking keyword rankings helps you explain how your tools scale and handle more data efficiently.
"What if we only tracked rankings for a fixed number of websites but increased keywords greatly? How would the time complexity change?"
Practice
Solution
Step 1: Understand keyword ranking meaning
Keyword ranking shows where your website appears in search engine results for specific words.Step 2: Identify the main goal of tracking rankings
Tracking rankings helps you know how visible your website is to users searching those keywords.Final Answer:
To see how well your website appears in search results -> Option AQuick Check:
Keyword ranking = website visibility [OK]
- Confusing ranking with website design
- Thinking ranking improves speed
- Assuming ranking creates content
Solution
Step 1: Identify tools for tracking rankings
SEO tools like Google Search Console provide data on keyword positions in search results.Step 2: Recognize unrelated actions
Editing code, changing font size, or adding images do not track keyword rankings directly.Final Answer:
Using SEO tools like Google Search Console -> Option CQuick Check:
SEO tools = ranking tracking [OK]
- Confusing design changes with ranking tracking
- Thinking manual code edits track rankings
- Assuming images affect ranking data collection
Solution
Step 1: Understand ranking positions
Lower position numbers mean higher placement on search results (position 1 is top).Step 2: Interpret position change from 10 to 3
Moving from 10 to 3 means the website is now ranked higher and more visible.Final Answer:
The website moved closer to the top of search results -> Option DQuick Check:
Lower rank number = better position [OK]
- Thinking higher number means better rank
- Confusing ranking with traffic loss
- Mixing ranking with site speed
Solution
Step 1: Identify why no data appears
No data usually means the tool is not linked correctly to the website or search engine.Step 2: Exclude unrelated reasons
Images, font size, or keyword count do not prevent data collection by tracking tools.Final Answer:
The tracking tool was not properly connected to the website -> Option AQuick Check:
Connection issue = no data [OK]
- Blaming images or font size for missing data
- Assuming keyword count stops data
- Ignoring setup steps for tracking tools
Solution
Step 1: Understand location-based ranking tracking
Rankings can differ by location, so tools that track by location give accurate local data.Step 2: Evaluate other options
Checking on one computer or changing font colors does not provide location-specific ranking data.Final Answer:
Use an SEO tool that supports location-based ranking tracking -> Option BQuick Check:
Location tracking needs specialized SEO tools [OK]
- Assuming one computer shows all locations
- Confusing design changes with tracking
- Thinking more keywords alone track locations
Ready to prove it?
Pass the test and this pattern moves unknown
