Skip to content

Merge two BST 's (pyhton,cpp or java) #58

Open

Description

@ArmanKumar21

Given two BSTs, return elements of both BSTs in sorted form.

Example 1:

Input:
BST1:
5
/
3 6
/
2 4
BST2:
2
/
1 3

7
/
6
Output: 1 2 2 3 3 4 5 6 6 7
Explanation:
After merging and sorting the two BST we get 1 2 2 3 3 4 5 6 6 7.

Example 2:

Input:
BST1:
12
/
9
/ \
6 11
BST2:
8
/
5 10
/
2
Output: 2 5 6 8 9 10 11 12
Explanation:
After merging and sorting the two BST we get 2 5 6 8 9 10 11 12.

Activity

  1. Aniumbott commented on Oct 10, 2022

    @Aniumbott
    Contributor

    I would like to work on this can you assign me ?

  2. SanjoySaha24 commented on Oct 14, 2022

    @SanjoySaha24

    I want to contribute. Please assign it @anomekumar08 as my first contribution for hacktoberfest 2022.
    I will submit code in java.

  3. Abhigitlog commented on Aug 31, 2023

    @Abhigitlog

    Good morning ,
    We are a team of 3 members from St Francis Institute of Technology (Mumbai , Maharashtra).
    For our Resource open source project Lab (ROSPL) , we are interested to work on the given issue.
    Kindly assign this issue to us .
    Thank You.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions