Starting from:

$30

EEE472-CSE422- Lab 1 Solved

Question 1

We all know that currently, we are going through a pandemic period. Several measures are now taken so that we can overcome this period and resume our daily activities like we did earlier. Educational institutions are trying to resume all activities and they are doing their best to do it successfully.

We know that this disease is contagious and anyone affected comes in contact with another person, then he or she needs to stay in quarantine. Suppose an educational institution “X” has hired you to design a system known as an “Infected tracker”. An infected tracker tries to figure out the region/number of surrounding people who can be affected by a single person. Then it prints the maximum region infected. Here you can consider Y being infected and N is not infected.

Your task is to find the maximum region with Y i.e. max people infected in a region so that strict measures can be taken in that region. Keep in mind that two people are said to be infected if two elements in the matrix are Y horizontally, vertically or diagonally.

==================================================================

==================================================================

Question 2
There is an Alien(Xenomorph) Apocalypse in XCITY and every minute Aliens are attacking human beings around them.

Imagine XCITY as a grid where "A" represents the position of an Alien, "H" represents the position of a human being and "T" represents heat traps set up by humans which the Aliens cannot cross. The regions of the Aliens will not overlap, i.e. two or more Aliens will never have a common human to prey on.

An Alien can attack human beings on it's north,south,east and west simultaneously using its deadly advanced physical attributes. A human being becomes a host after an attack and a new Alien spawns in that position.

Your task is to find out the minimum number of minutes it would take for the Aliens to attack all the humans around them. Also, print "No one survived" if no human beings survive the Apocalypse or "number_of_human_beings survived" otherwise.

==================================================================

 

More products