Breadth First Search: Shortest Reach HackerRank Solution C, CPP, Python
Consider an undirected graph where each edge weighs 6 units. Each of the nodes is labeled consecutively from 1 to n. You will be given a number of queries. For …
Consider an undirected graph where each edge weighs 6 units. Each of the nodes is labeled consecutively from 1 to n. You will be given a number of queries. For …
You are given an array with -bit integers: BIT(x, i) = (x >> i) & 1, where is the lower bit of in binary form. If we regard every bit as a vertex of …
Bitville is a seaside city that has a number of shopping centers connected by bidirectional roads, each of which has a travel time associated with it. Each of the shopping …
The member states of the UN are planning to send people to the moon. They want them to be from different countries. You will be given a list of pairs of …
Determine the minimum cost to provide library access to all citizens of HackerLand. There are cities numbered from to . Currently there are no libraries and the cities are not connected. Bidirectional roads …
Write a query that prints a list of employee names (i.e.: the name attribute) from the Employee table in alphabetical order. Input Format The Employee table containing employee data for a company is described as follows: …
Query the Name of any student in STUDENTS who scored higher than 75 Marks. Order your output by the last three characters of each name. If two or more students both have names ending in the …
Query the list of CITY names from STATION that do not start with vowels and do not end with vowels. Your result cannot contain duplicates. Input Format The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the …
Query the list of CITY names from STATION that either do not start with vowels or do not end with vowels. Your result cannot contain duplicates. Input Format The STATION table is described as follows: where LAT_N is …
In Insertion Sort Part 1, you inserted one element into an array at its correct sorted position. Using the same approach repeatedly, can you sort an entire array? Guideline: You …