TREES IN APEX & JAVASCRIPT
DANIEL PETER
@DANIELJPETER
SALESFORCE MVP
20X SALESFORCE CERTIFIED
BAY AREA SALESFORCE DEVELOPER GROUP LEADER
LEAD APPLICATIONS ENGINEER, KENANDY
OBJECTIVE
• Cover the practical uses of trees for a Salesforce Developer
• Give you the best bang for the buck, not be exhaustive in theory
TREE STRUCTURE • nodes
• root
• parent
• child / children
• leaf
• descendant
• ancestor
• ordered / non ordered
• binary tree
• depth
• height
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
TREE TRAVERSAL - TYPES
preord
er
postorde
r
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
RESOURCES
• My Code: https://github.com/danieljpeter/ApexTreeTraversalDemo/
• Flat To Nested: https://github.com/joaonuno/flat-to-nested-js/blob/master/index.js
TAHOE DREAMIN’
• JAN. 20-21, 2017 - 2 DAY SALESFORCE AWESOMENESS IN SOUTH LAKE TAHOE!
• http://www.tahoedreamin.com/
• Promocode: UserGroupMember

Tree Traversal #SalesforceSaturday

  • 1.
    TREES IN APEX& JAVASCRIPT DANIEL PETER @DANIELJPETER SALESFORCE MVP 20X SALESFORCE CERTIFIED BAY AREA SALESFORCE DEVELOPER GROUP LEADER LEAD APPLICATIONS ENGINEER, KENANDY
  • 2.
    OBJECTIVE • Cover thepractical uses of trees for a Salesforce Developer • Give you the best bang for the buck, not be exhaustive in theory
  • 3.
    TREE STRUCTURE •nodes • root • parent • child / children • leaf • descendant • ancestor • ordered / non ordered • binary tree • depth • height
  • 4.
    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
  • 5.
    TREE TRAVERSAL -TYPES preord er postorde r 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
  • 6.
    RESOURCES • My Code:https://github.com/danieljpeter/ApexTreeTraversalDemo/ • Flat To Nested: https://github.com/joaonuno/flat-to-nested-js/blob/master/index.js
  • 7.
    TAHOE DREAMIN’ • JAN.20-21, 2017 - 2 DAY SALESFORCE AWESOMENESS IN SOUTH LAKE TAHOE! • http://www.tahoedreamin.com/ • Promocode: UserGroupMember