Seksjon 1. Kapittel 7
single
Challenge: Find Orphan Pages
Sveip for å vise menyen
Identifying orphan pages—pages on your website that are not linked to by any other page—is a crucial step in improving site structure and SEO. Orphan pages are often overlooked by both users and search engines, resulting in poor discoverability and lower rankings. By programmatically detecting these pages, you can ensure your site is fully interconnected and optimized for crawling.
Oppgave
Swipe to start coding
Given a dictionary representing a website's internal link structure, return a list of orphan page names—pages that are not linked to by any other page.
- The function receives
site_structure, a dictionary where keys are page names and values are lists of linked page names. - Identify all pages that are present as keys in
site_structurebut do not appear in any of the values ofsite_structure. - Return a list of these orphan page names.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 7
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår