Jump to content

Programmers plz help


Recommended Posts

Posted

sample assingment ichru interview ki...google cheste some answers dorikayii gani not able to write with numbers.

 

## Second question:

## you need to define the tree/node object and also define the function to serialize the tree

  class Node:   pass

    def serialize_tree(tree):

      """

      Serialize a tree from top to bottom, left to right to a list of values

      Args:

        a Tree object, each node has an integer value, and optionally have a left and right children, The tree is not ordered or balanced, it's just a binary tree

        example:

            1

           / \

          2   3

         / \ / \

           4 2

      Returns:

        a list of serialized values

        example: [1,2,3,None,4,2,None]

    """

Posted

c# ??

ltt

Posted
Just now, Biskot said:

c# ??

ltt

python. but any language is fine

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...