Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Binary tree from a list
#15
Simply, this new method should count nodes in a selected subtree, specified by a given node data. This node represents a root of that subtree, whose nodes it has to count. So what do I want to do, is to find that node data in already created "nodes" (dictionary), to find its Node refference and then apply the basic nodes counting, beginning with this node. However, I have "nodes" in other method and so what I need to know is, how can I use "nodes" also in this new method, without making an attribute for the whole class.
Reply


Messages In This Thread
Binary tree from a list - by dan789 - Mar-30-2019, 02:40 PM
RE: Binary tree from a list - by ichabod801 - Mar-30-2019, 03:00 PM
RE: Binary tree from a list - by dan789 - Mar-30-2019, 03:02 PM
RE: Binary tree from a list - by ichabod801 - Mar-30-2019, 03:24 PM
RE: Binary tree from a list - by dan789 - Mar-30-2019, 03:41 PM
RE: Binary tree from a list - by ichabod801 - Mar-30-2019, 05:42 PM
RE: Binary tree from a list - by dan789 - Mar-30-2019, 06:06 PM
RE: Binary tree from a list - by ichabod801 - Mar-30-2019, 06:53 PM
RE: Binary tree from a list - by dan789 - Mar-31-2019, 01:41 PM
RE: Binary tree from a list - by ichabod801 - Mar-31-2019, 02:05 PM
RE: Binary tree from a list - by dan789 - Mar-31-2019, 02:10 PM
RE: Binary tree from a list - by ichabod801 - Mar-31-2019, 02:13 PM
RE: Binary tree from a list - by dan789 - Mar-31-2019, 02:20 PM
RE: Binary tree from a list - by ichabod801 - Mar-31-2019, 08:26 PM
RE: Binary tree from a list - by dan789 - Mar-31-2019, 09:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Code for Preorder Traversal of a Binary Tree Bolt 1 618 Sep-22-2023, 09:32 AM
Last Post: Gribouillis
  Binary tree AlexPython 3 1,014 Dec-07-2022, 06:41 AM
Last Post: ndc85430
  Group List Elements according to the Input with the order of binary combination quest_ 19 6,586 Jan-28-2021, 03:36 AM
Last Post: bowlofred
  Python3 binary tree not replacing parent nodes with child nodes Aspect11 0 1,799 Sep-23-2020, 02:22 PM
Last Post: Aspect11
  search binary file and list all founded keyword offset Pyguys 4 2,816 Mar-17-2020, 06:46 AM
Last Post: Pyguys
  hex file to binary or pcap to binary baran01 1 5,728 Dec-11-2019, 10:19 PM
Last Post: Larz60+
  Pack binary data to list of integers bearer 0 2,171 Mar-29-2019, 12:17 PM
Last Post: bearer
  Convert tree to list of lists Dylan_T_Rabbit 2 11,777 Jul-12-2017, 02:09 PM
Last Post: Dylan_T_Rabbit

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020