Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Artificial Intelligence for Search

You're reading from   Hands-On Artificial Intelligence for Search Building intelligent applications and perform enterprise searches

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher Packt
ISBN-13 9781789611151
Length 124 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Devangini Patel Devangini Patel
Author Profile Icon Devangini Patel
Devangini Patel
Arrow right icon
View More author details
Toc

Understanding the Breadth-First Search Algorithm

The breadth-first search (BFS) algorithm is a traversing algorithm where you start at a selected node (the source or starting node) and traverse the graph layer-wise, exploring the neighboring nodes (nodes that are directly connected to the source node). You then move towards the neighboring nodes in the next level.

In this chapter, you will learn about BFS while developing LinkedIn's connection feature. You will learn how second-degree connections can be computed by using the BFS algorithm.

In this chapter, we will cover the following topics:

  • Understanding the LinkedIn connection feature
  • Graph data structure
  • Queue data structure
  • The BFS algorithm
  • DFS versus BFS
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime