Tree Traversal #SalesforceSaturday

7
TREES IN APEX & JAVASCRIPT DANIEL PETER @DANIELJPETER SALESFORCE MVP 20X SALESFORCE CERTIFIED BAY AREA SALESFORCE DEVELOPER GROUP LEADER LEAD APPLICATIONS ENGINEER, KENANDY

Transcript of Tree Traversal #SalesforceSaturday

Page 1: Tree Traversal #SalesforceSaturday

TREES IN APEX & JAVASCRIPT

DANIEL PETER@DANIELJPETER

SALESFORCE MVP

20X SALESFORCE CERTIFIED

BAY AREA SALESFORCE DEVELOPER GROUP LEADER

LEAD APPLICATIONS ENGINEER, KENANDY

Page 2: Tree Traversal #SalesforceSaturday

OBJECTIVE

• Cover the practical uses of trees for a Salesforce Developer• Give you the best bang for the buck, not be exhaustive in theory

Page 3: Tree Traversal #SalesforceSaturday

TREE STRUCTURE • nodes• root• parent• child / children• leaf• descendant• ancestor• ordered / non ordered• binary tree• depth• height

Page 4: Tree Traversal #SalesforceSaturday

TREE TRAVERSAL - DEFINITION

• In computer science, tree traversal (also known as tree search) is a form of graph traversal and refers to the process of visiting (checking and/or updating) each node in a tree data structure, exactly once. Such traversals are classified by the order in which the nodes are visited.

- Wikipedia

Page 5: Tree Traversal #SalesforceSaturday

TREE TRAVERSAL - TYPESpreorder

postorder

F, B, A, D, C, E, G, I, H.

A, C, E, D, B, H, I, G, F.

Depth First• preorder• postorder• inorder

Breadth First• levelorder

Other• Euler tour

Page 7: Tree Traversal #SalesforceSaturday

TAHOE DREAMIN’• JAN. 20-21, 2017 - 2 DAY SALESFORCE AWESOMENESS IN SOUTH LAKE TAHOE!

• http://www.tahoedreamin.com/

• Promocode: UserGroupMember