Data Structure assignment 辅导

数据结构作业辅导

Parallel Computing and Dijkstra's Algorithm

Department of Computer Science Intro to Parallel Computing
Programming Assignment 3
Due Wednesday, October 28 at 6 pm
Dijkstra’s Algorithm
Edsger Dijkstra was a Dutch computer scientist. He is unquestionably one of the found-
ing fathers of computer science. In addition to devising Dijkstra’s algorithm, he was one
of the originators of structured programming | a precursor to modern object-oriented pro-
gramming. C, for example, is a structured programming language. He also made many
contributions to the solution of process-coordination problems in parallel computing: we’ll
learn about several later on in the course. His Wikipedia page lists more than fty funda-
mental contributions to computer science.
Dijkstra’s algorithm solves the single-source shortest path problem” in a weighted, di-
rected graph. The input consists of a weighted, directed graph and a speci ed vertex in the
graph. A directed graph or digraph is a collection of vertices and directed edges, which join
one vertex to another. A weighted dig

c语言扫雷游戏 minesweeper实现

minesweeper C 程序代写

1. (Time: 2 – 3 hours) For your final project you will be implementing the computer

game minesweeper. The game of minesweeper works as follows:

1. There is a rectangular grid of tiles

2. Hidden under some of the tiles are mines

3. Your goal is to mark all the tiles that contain mines and uncover all the tiles

4. If you uncover a tile that contains a mine you lose the game

5. If you uncover a tile that doesn’t contain a mine, it tells you how many mines

that don’t contain mines

are hidden in the eight surrounding squares

Here are some example boards with all of their contents revealed so that you can get an

idea as to what they look like.

Example 1:

2 * * 2 0

1 5 * 3 0

0 * * 2 0

0 1 2 3

Example 2:

9 0 0 0 0 0 1 1 1 0 0

8 0 0 0 0 0 1 * 1 0 0

7 0 1 1 1 0 1 1 2 1 1

6 0 1 * 1 1 1 1 1 * 1

5 0 1 1 1 1 * 1 1 1 1

4 1 1 1 0 1 1 1 0 0 0

3 1 * 1 0 0 0 0 0 0 0

2 1 1 1 0 0 0 0 0 0 0

1 1 2 1 1 0 1 1 2 2 2

0 * 2 * 1 0 1 * 2 * *

0 1 2 3 4 5 6 7 8 9

Requirements

1. Name your exe

COMP2355 lab12 solution

C++多线程程序代写,sharequeue实现

Synchronizing Multiple Threads

In this lab you will convert your templated LList class to a SharedQueue class (you may adapt your own code or use the Lab 9 Solution). The shared queue can be safely used by many different threads without causing memory corruption. You can download the source code for this lab from Lab12Source.zip. Create a project called Lab12 and add the source code from t