Create tree data structures with breadth first search and depth first search algorithms

Write a function that will output breadth first search and depth first search order for a tree data structure. The tree shall only contain integers for it’s node. I expect the following:

(1) A PHP class that represents a tree data structure.

(2) A PHP function (BFS) that takes a tree as input and output the ordering of a breadth first search on the command line.

(3) A PHP function (DFS) that will output a depth first search on the same tree

(4) I should be able to run the class on the command line


- Ensure that your function can handle cycles

- Ensure that the nodes can only be integer

When you apply to this job, answer the following questions. IF YOU DO NOT ANSWER THESE QUESTIONS, YOU WILL NOT BE CONSIDERED.

(1) What is the complexity (O runtime) of BFS and DFS?

(2) What is the difference between a stack and queue data structure?

(3) How many hours will it take to do this job?

Skills: PHP, Software Architecture

See more: breadth search data structure, what is tree data structure, what is stack data structure, what is queue data structure, what is data structures and algorithms, what is data structures, what is data structure, what is data input, what is breadth first search, what is bfs and dfs, what is a tree node, what is a tree data structure, what is algorithms, what is a data structures, what is a data structure, what is a algorithms, what data structure, tree of data structure, tree node, tree data structures, tree data structure c, structures data, stack of data structure, stack data structures, stack data structure

About the Employer:
( 0 reviews ) United States

Project ID: #5041416

4 freelancers are bidding on average $20 for this job


Hi, I am placing my bid on your project because I have read the requirements and I am confident enough with my PHP and Algorithmic skills. I have implemented the Tree data structure before and also those algorithms suc More

$30 USD in 1 day
(71 Reviews)

Hi, Ready to start . Here i message you answers of question. Please check message Let me know your resposne Thanks Sanket

$30 USD in 3 days
(13 Reviews)

Hello, It's essentially very easy task for me, I will write this class for you in a no time. Basically, I have already wrote BFS and DFS many times, so I have only to write appropriate CLI representation of graphs, More

$10 USD in 0 days
(1 Review)

I am a experienced php/java programmer ill do this for you 1) What is the complexity (O runtime) of BFS and DFS? BFS: Worst case O(|E| + |V|) DFS: Worst case O(|E| + |V|) (2) What is the difference b More

$10 USD in 1 day
(0 Reviews)