Data Structure作业代做、BFS留学生作业代写、Python/c++,Java语言作业代做代做Java程序|代写Python程序

Data Structure Assignment # 2 2019-04-11 Prof. Joonwon LeeBFS(Breadth-First Search)–Routing from the root node (the start node) to the nearest node first, and later to the far node–You should visit all nodes once–Use queue data structure which can retrieve the visited nodes in order. (FIFO)–You have to use BFS to solve this assignment.Solve a problem: Queue–Hyeonahs tomato farm has a large warehouse for storing tomatoes–The tomatoes are placed in a box (a grid-shaped box) as shown in the picture below and stored in a warehouse –Some of the tomatoes stored in the warehouse are ripe, but some are unripe.–After a day of storage, unripe tomatoes will ripe if its neighbors contain of ripe tomatoes.–The neighbors of one tomato are the tomatoes in the left, right, front, or back.–Assume there is no effect to tomatoes in the diagonal direction and assumes that the tomatoes do not ripen by themselves.–When storing the tomatoes at her warehouse, Hyeonah wants to know what is the minimum number of days that all of the tomatoes will ripe.–Given the size of the grid-shaped box that is used to store the tomatoes in the warehouse, and the information of ripe tomatoes and unripe tomatoes, write a program to get the minimum number of days that all of the tomatoes will ripen a few days.–However, note that some boxes may not contain tomatoes–Set one of the tomatoes as the root node (start node) and then use BFS to solve the problemExamples of Input–In the first line, enter the number of test cases.–The second line contains two integers, M and N, indicating the size of the grid-shaped box.–M is the horizontal size, and N is the vertical size of the grid-shaped box.–Conditionally, 2 ≤ M, N ≤ 1,000.–The third line contains information about the tomatoes stored in a box. The input will be a matrix with size M x N.–In the matrix, an integer 1 represents a ripe tomato, an integer 0 represents unripe tomatoes, and an integer -1 represents a space containing no tomato.–You should print the minimum days until the tomatoes are all ripeExamples of Ouput–If all the tomatoes have been ripen from the time they are stored, 0 should be the output.–If the all tomatoes are not ripe, they should be printed as -1.Examples of Input & Ouput本团队核心人员组成主要包括BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:[email protected] 微信:codehelp

你可能感兴趣的:(Data Structure作业代做、BFS留学生作业代写、Python/c++,Java语言作业代做代做Java程序|代写Python程序)