Jump to content
MrGrj

Proiect simplu grafuri C++/Python - 20$

Recommended Posts

  • Active Members
Posted (edited)

Am primit un proiect simplu pe un site de freelancing insa nu am timp de el. Cine are nevoie de bani si stie c++, let me know. Tre' facut in 6h(//EDITED) incepand de acum.

Cerinte:

QUESTION 1

a) Write the pseudo code for an unweighted graph data structure. You either use an adjacency matrix or an adjacency list approach. Also write a function to add a new node and a function to add an edge.

B) Implement the graph you have designed in the programming language of your choice. You may use your own linked list from previous labs, the STL LL, or use a simple fixed size array (10 elements would be fine).

c) What changes would you need to make to include weighted vertices? You can use a notation like below to represent a object-like structure:

d) Find functions that output in the "dot" language of graphviz. Graphviz can also be used to display graphs. Write a function that exports a graph as a dot file, or displays dot language output that can be redirected to a file.

QUESTION 2

For the graph you have already implemented, implement either depth first or breadth first search. You may use the stack or queues from a library or your own implementation

QUESTION 3

a) In either Python or C++, write a class that stores a series of numbers. The length of the sequence can be set in the constructor. All numbers will be floats in the range -1 to 1 (inclusive).

B) Add a function to display the sequence visually. This will be done by drawing it as a waveform, vertically. See the example below.

c) Add a function that takes a functor / lambda that can be used to replace every value with another based on the original value. For example, all values such that abs(x) < 0.5 become -1 or 1 depending on whether they were originally negative or positive.

Banii ii trimit pe PP dupa ce verifica omu' ce ati facut si imi baga banii, asa ca e posibil sa dureze 1-2 zile.

Edited by MrGrj

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...