SlideShare a Scribd company logo
SIT221 Data Structures and Algorithms Trimester 2, 2019
1
Practical Task 5.1
(Pass Task)
Submission deadline: 10:00am Monday, August 26
Discussion deadline: 10:00am Saturday, September 14
General Instructions
The objective of this task is to study implementation of a Doubl
y Linked List, a generic data structure capable
to maintain an arbitrary number of data elements and support va
rious standard operations to read, write,
and delete data. Compared to other popular data structures, link
ed list like data structures offer a number
of advantages with respect to time complexity and practical appl
ication. For example, where an array‐based
data structure, such as a simple list (or a vector), requires a cont
iguous memory location to store data, a
linked list may record new data elements anywhere in the memo
ry. This is achievable by encapsulation of a
payload (the user’s data record) into a node, then connecting no
des into a sequence via memory references
(also known as links). Because of this, a linked list is not restric
ted in size and new nodes can be added
increasing the size of the list to any extent. Furthermore, it is al
lowed to use the first free and available
memory location with only a single overhead step of storing the
address of memory location in the previous
node of a linked list. This makes insertion and removal operatio
ns in a linked list of a constant 1 time;
that is, as fast as possible. Remember that these operations gene
rally run in a linear n time in an array
since memory locations are consecutive and fixed.
A doubly linked list outperforms a singly linked list achieving b
etter runtime for deletion of a given data node
as it enables traversing the sequence of nodes in both directions
, i.e. from starting to end and as well as from
end to starting. For a given a node, it is always possible to reac
h the previous node; this is what a singly linked
list does not permit. However, these benefits come at the cost of
extra memory consumption since one
additional variable is required to implement a link to previous n
ode. In the case of a simpler singly linked list,
just one link is used to refer to the next node. However, traversi
ng is then possible in one direction only, from
the head of a linked list to its end.
1.
To start, follow the link below and explore the functionality of t
he LinkedList<T> generic class available
within the Microsoft .NET Framework.
https://msdn.microsoft.com/en‐au/library/he2s3bh7(v=vs.110).a
spx.
Because some operations that you are asked to develop in
this task are similar to those in the
LinkedList<T>, you may refer to the existing description of the
class to get more insights about how your
own code should work.
2.
Explore the source code attached to this task. Create a new Micr
osoft Visual Studio project and import
the DoublyLinkedList.cs file. This file contains a template of th
e DoublyLinkedList<T> class. The objective
of the task is to develop the missing functionality of the class to
obtain a fully‐functional data structure.
Subsequently, import the Tester.cs file to the project to enable t
he prepared Main method important for
the purpose of debugging and testing the expected program clas
s and its interfaces for runtime and logical
errors.
3.
Find the nested Node<K> class presented inside the DoublyLink
edList<T> and learn its structure. This is a
generic class whose purpose is to represent a node of a doubly li
nked list. Think about it as an atomic data
structure itself that serves the DoublyLinkedList<T> as a buildi
ng block. In fact, a doubly linked list is a
linear collection of data elements, whose order is not given by t
heir physical positions in memory, for
example like in arrays. Instead, each element points to
the next (and the previous) one. It is a data
structure consisting of a set of nodes which together represent a
sequence. Generally, a node of a doubly
linked list consists of a data record that holds a payload
and two auxiliary pointers referring to the
SIT221 Data Structures and Algorithms Trimester 2, 2019
2
preceding and succeeding nodes in the ordered sequence of node
s constituting the linked list. The two
pointers allow to navigate back and forth between two adjacent
nodes.
Note that the Node<K> class is ready for you to use. It provides
the following functionality:
value, Node<K> previous, Node<K> next)
Initializes a new instance of the Node<K> class, containing the
specified value and referring to previous and next
arguments as nodes before and after the new node, respectively,
in the sequence of the associated doubly linked
list.
Value
Property. Gets or sets the value (payload) of type K contained i
n the node.
Next
Property. Gets a reference to the next node in the DoublyLinked
List<T>, or null if the current node is the last
element of the DoublyLinkedList<T>.
Previous
Property. Gets a reference to the previous node in the DoublyLi
nkedList<T>, or null if the current node is the first
element of the DoublyLinkedList<T>.
ToString()
Returns a string that represents the current Node<K>. ToString(
) is the major formatting method in the .NET
Framework. It converts an object to its string representation so t
hat it is suitable for display.
You may have already noticed that the Node<K> implements th
e INode<K> interface, which is available
in the attached INode.cs file. The reason for the use of the interf
ace is that the Node<K> is a data structure
internal to the DoublyLinkedList<T> class, thus an instance of t
he Node<K> must not be exposed to the
user. It must be hidden to protect an instance of
the DoublyLinkedList<T> from potential corruption
caused by the user’s activities. However, because a user needs a
ccess to the data that the user owns and
stores inside an instance of the DoublyLinkedList<T>, the Node
<K> implements the interfaces that permits
to read and set (write) the data. Check the INode<K> and see th
at the only property it implies is Value of
generic type K.
4.
Proceed with the given template of the DoublyLinkedList<T> cl
ass and explore the methods that it has
implemented for you for the purpose of example, in particular:
Initializes a new instance of the DoublyLinkedList<T> class tha
t is empty.
Property. Gets the first node of the DoublyLinkedList<T>. If th
e DoublyLinkedList<T> is empty, the First property
returns null.
Property. Gets the last node of the DoublyLinkedList<T>. If the
DoublyLinkedList<T> is empty, the Last property
returns null.
Property. Gets the number of nodes actually contained in the Do
ublyLinkedList<T>.
After(INode<T> node)
Returns the node casted to the INode<T> that succeeds the speci
fied node in the DoublyLinkedList<T>. If the
node given as parameter is null, it throws the ArgumentNullExc
eption. If the parameter is not in the current
DoublyLinkedList<T>, the method throws the InvalidOperation
Exception.
INode<T> AddLast(T value)
Adds a new node containing the specified value at the end of th
e DoublyLinkedList<T>. Returns the new node
casted to the INode<T> with the recorded value.
SIT221 Data Structures and Algorithms Trimester 2, 2019
3
Find(T value)
Finds the first occurrence in the DoublyLinkedList<T> that cont
ains the specified value. The method returns the
node casted to INode<T>, if found; otherwise, null. The Doubly
LinkedList<T> is searched forward starting at First
and ending at Last.
ring ToString()
Returns a string that represents the current DoublyLinkedList<T
>. ToString() is the major formatting method in
the .NET Framework. It converts an object to its string represen
tation so that it is suitable for display.
As part of the prepared DoublyLinkedList<T> class, you can als
o observe a number of private properties
and methods. An important aspect of the DoublyLinkedList<T>
is the use of two auxiliary nodes: the Head
and the Tail. The both are introduced in order to significantly si
mplify the implementation of the class and
make insertion functionality reduced just to a single method des
ignated here as
Node<T> AddBetween(T value, Node<T> previous, Node<T> n
ext)
In fact, the Head and the Tail are invisible to a user of the data
structure and are always maintained in it,
even when the DoublyLinkedList<T> is formally empty. When t
here is no element in it, the Head refers to
the Tail, and vice versa. Note that in this case the First and the
Last properties are set to null. The first
added node therefore is to be placed in between the Head and th
e Tail so that the former points to the
new node as the Next node, while the latter points to it as the Pr
evious node. Hence, from the perspective
of the internal structure of the DoublyLinkedList<T>, the
First element is the next to the Head, and
similarly, the Last element is previous to the Tail. Remember ab
out this crucial fact when you design and
code other functions of the DoublyLinkedList<T> in this task.
The given template of the DoublyLinkedList <T> class should h
elp you with development of its remaining
methods. Therefore, explore the existing code as other methods
are to be similar in terms of logic and
implementation.
5.
You must complete the DoublyLinkedList<T> and provide the f
ollowing functionality to the user:
Before(INode<T> node)
Returns the node, casted to the INode<T>, which precedes the s
pecified node in the DoublyLinkedList<T>. If the
node given as parameter is null, the method throws the Argumen
tNullException. If the parameter is not in the
current DoublyLinkedList<T>, the method throws the InvalidOp
erationException.
AddFirst(T value)
Adds a new node containing the specified value at the start of th
e DoublyLinkedList<T>. Returns the new node
casted to the INode<T> containing the value.
AddBefore(INode<T> before, T value)
Adds a new node before the specified node of the DoublyLinked
List<T> and records the given value as its payload.
It returns the newly created node casted to the INode<T>. If the
node specified as an argument is null, the
method throws the ArgumentNullException. If the node
specified as argument does not exist in the
DoublyLinkedList<T>, the method throws the InvalidOperation
Exception.
AddAfter(INode<T> after, T value)
Adds a new node after the specified node of the DoublyLinkedL
ist<T> and records the given value as its payload.
It returns the newly created node casted to the INode<T>. If the
node specified as argument is null, the method
throws the ArgumentNullException. If the node specified as arg
ument does not exist in the DoublyLinkedList<T>,
the method throws the InvalidOperationException.
Clear()
Removes all nodes from the DoublyLinkedList<T>. Count is set
to zero. For each of the nodes, links to the previous
and the next nodes must be nullified.
Remove(INode<T> node)
Removes the specified node from the DoublyLinkedList<T>. If
node is null, it throws the ArgumentNullException.
If the node specified as argument does not exist in the
DoublyLinkedList<T>, the method throws the
InvalidOperationException.
SIT221 Data Structures and Algorithms Trimester 2, 2019
4
RemoveFirst()
Removes the node at the start of the
DoublyLinkedList<T>. If the DoublyLinkedList<T> is
empty, it throws
InvalidOperationException.
RemoveLast()
Removes the node at the end of the
DoublyLinkedList<T>. If the DoublyLinkedList<T> is
empty, it throws
InvalidOperationException.
Note that you are free in writing your code that is private to the
DoublyLinkedList<T> unless you respect
all the requirements in terms of functionality and signatures of t
he specified methods.
6.
As you progress with the implementation of the DoublyLinkedL
ist <T> class, you should start using the
Tester class to thoroughly test the DoublyLinkedList<T> aiming
on the coverage of all potential logical
issues and runtime errors. This (testing) part of the task is as im
portant as writing the DoublyLinkedList<T>
class. The given version of the testing class covers only some b
asic cases. Therefore, you should extend it
with extra cases to make sure that your doubly linked list class i
s checked against other potential mistakes.
Further Notes
Learn the material of chapters 3.4 and especially that of section
7.3.3 of the SIT221 course book “Data
structures and algorithms in Java” (2014) by M. Goodrich, R. T
amassia, and M. Goldwasser. You may
access the book on‐line for free from the reading list application
in CloudDeakin available in Resources
Additional Course Resources Resources on Algorithms
and Data Structures Course Book: Data
structures and algorithms in Java. As a complementary material,
to learn more about a singly linked and
doubly linked lists, you may refer to Chapter 2 of SIT221 Work
book available in CloudDeakin in Resources
Additional Course Resources Resources on Algorithms and
Data Structures SIT221 Workbook.
If you still struggle with such OOP concepts as Generics and the
ir application, you may wish to read
Chapter 11 of SIT232 Workbook available in Resources Addit
ional Course Resources Resources on
Object‐Oriented Programming. You may also have to read
Chapter 6 of SIT232 Workbook about
Polymorphism and Interfaces as you need excellent
understanding of these topics to progress well
through the practical tasks of the unit. Make sure that you are pr
oficient with them as they form a basis
to design and develop programming modules in this and all the s
ubsequent tasks. You may find other
important topics required to complete the task, like
exceptions handling, in other chapters of the
workbook.
We will test your code in Microsoft Visual Studio 2017. Find th
e instructions to install the community
version of Microsoft Visual Studio 2017 available on the
SIT221 unit web‐page in CloudDeakin at
Resources Additional Course Resources Software Visual
Studio Community 2017. You are free to
use another IDE if you prefer that, e.g. Visual Studio Code. But
we recommend you to take a chance to
learn this environment.
Marking Process and Discussion
To get your task completed, you must finish the following steps
strictly on time.
Make sure that your program implements all the required functi
onality, is compliable, and has no runtime
errors. Programs causing compilation or runtime errors will not
be accepted as a solution. You need to
test your program thoroughly before submission. Think about po
tential errors where your program might
fail.
Submit your program code as an answer to the task via OnTrack
submission system.
Meet with your marking tutor to demonstrate and discuss your p
rogram in one of the dedicated practical
sessions. Be on time with respect to the specified discussion dea
dline.
SIT221 Data Structures and Algorithms Trimester 2, 2019
5
Answer all additional (theoretical) questions that your tutor can
ask you. Questions are likely to cover
lecture notes, so attending (or watching) lectures should help yo
u with this compulsory interview part.
Please, come prepared so that the class time is used efficiently a
nd fairly for all the students in it. You
should start your interview as soon as possible as if your answer
s are wrong, you may have to pass another
interview, still before the deadline. Use available attempts prop
erly.
Note that we will not check your solution after the submission d
eadline and will not discuss it after the
discussion deadline. If you fail one of the deadlines, you fail th
e task and this reduces the chance to pass the
unit. Unless extended for all students, the deadlines are
strict to guarantee smooth and on‐time work
through the unit.
Remember that this is your responsibility to keep track of your
progress in the unit that includes checking
which tasks have been marked as completed in the OnTrack syst
em by your marking tutor, and which are still
to be finalised. When marking you at the end of the unit, we wil
l solely rely on the records of the OnTrack
system and feedback provided by your tutor about your overall
progress and quality of your solutions.
Expected Printout
This section displays the printout produced by the attached Test
er class, specifically by its Main method. It is
based on our solution. The printout is provided here to help wit
h testing your code for potential logical errors.
It demonstrates the correct logic rather than an expected printou
t in terms of text and alignment.
Test A: Create a new list by calling 'DoublyLinkedList<int>
vector = new DoublyLinkedList<int>( );'
:: SUCCESS: list's state []
Test B: Add a sequence of numbers 2, 6, 8, 5, 1, 8, 5, 3, 5 with
list.AddLast( )
:: SUCCESS: list's state [{XXX-(2)-6},{2-(6)-8},{6-(8)-5},{8-
(5)-1},{5-(1)-8},{1-(8)-5},{8-(5)-3},{5-(3)-5},{3-(5)-XXX}]
Test C: Remove sequentially 4 last numbers with
list.RemoveLast( )
:: SUCCESS: list's state [{XXX-(2)-6},{2-(6)-8},{6-(8)-5},{8-
(5)-1},{5-(1)-XXX}]
Test D: Add a sequence of numbers 10, 20, 30, 40, 50 with
list.AddFirst( )
:: SUCCESS: list's state [{XXX-(50)-40},{50-(40)-30},{40-
(30)-20},{30-(20)-10},{20-(10)-2},{10-(2)-6},{2-(6)-8},{6-(8)-
5},{8-
(5)-1},{5-(1)-XXX}]
Test E: Remove sequentially 3 last numbers with
list.RemoveFirst( )
:: SUCCESS: list's state [{XXX-(20)-10},{20-(10)-2},{10-(2)-
6},{2-(6)-8},{6-(8)-5},{8-(5)-1},{5-(1)-XXX}]
Test F: Run a sequence of operations:
list.Find(40);
:: SUCCESS: list's state [{XXX-(20)-10},{20-(10)-2},{10-(2)-
6},{2-(6)-8},{6-(8)-5},{8-(5)-1},{5-(1)-XXX}]
list.Find(0);
:: SUCCESS: list's state [{XXX-(20)-10},{20-(10)-2},{10-(2)-
6},{2-(6)-8},{6-(8)-5},{8-(5)-1},{5-(1)-XXX}]
list.Find(2);
:: SUCCESS: list's state [{XXX-(20)-10},{20-(10)-2},{10-(2)-
6},{2-(6)-8},{6-(8)-5},{8-(5)-1},{5-(1)-XXX}]
Test G: Run a sequence of operations:
Add 100 before the node with 2 with list.AddBefore(2,100)
:: SUCCESS: list's state [{XXX-(20)-10},{20-(10)-100},{10-
(100)-2},{100-(2)-6},{2-(6)-8},{6-(8)-5},{8-(5)-1},{5-(1)-
XXX}]
SIT221 Data Structures and Algorithms Trimester 2, 2019
6
Add 200 after the node with 2 with list.AddAfter(2,200)
:: SUCCESS: list's state [{XXX-(20)-10},{20-(10)-100},{10-
(100)-2},{100-(2)-200},{2-(200)-6},{200-(6)-8},{6-(8)-5},{8-
(5)-
1},{5-(1)-XXX}]
Add 300 before node list.First with
list.AddBefore(list.First,300)
:: SUCCESS: list's state [{XXX-(300)-20},{300-(20)-10},{20-
(10)-100},{10-(100)-2},{100-(2)-200},{2-(200)-6},{200-(6)-
8},{6-(8)-5},{8-(5)-1},{5-(1)-XXX}]
Add 400 after node list.First with list.AddAfter(list.First,400)
:: SUCCESS: list's state [{XXX-(300)-400},{300-(400)-
20},{400-(20)-10},{20-(10)-100},{10-(100)-2},{100-(2)-
200},{2-(200)-
6},{200-(6)-8},{6-(8)-5},{8-(5)-1},{5-(1)-XXX}]
Add 500 before node list.First with
list.AddBefore(list.Last,500)
:: SUCCESS: list's state [{XXX-(300)-400},{300-(400)-
20},{400-(20)-10},{20-(10)-100},{10-(100)-2},{100-(2)-
200},{2-(200)-
6},{200-(6)-8},{6-(8)-5},{8-(5)-500},{5-(500)-1},{500-(1)-
XXX}]
Add 600 after node list.First with list.AddAfter(list.Last,600)
:: SUCCESS: list's state [{XXX-(300)-400},{300-(400)-
20},{400-(20)-10},{20-(10)-100},{10-(100)-2},{100-(2)-
200},{2-(200)-
6},{200-(6)-8},{6-(8)-5},{8-(5)-500},{5-(500)-1},{500-(1)-
600},{1-(600)-XXX}]
Test H: Run a sequence of operations:
Remove the node list.First with list.Remove(list.First)
:: SUCCESS: list's state [{XXX-(400)-20},{400-(20)-10},{20-
(10)-100},{10-(100)-2},{100-(2)-200},{2-(200)-6},{200-(6)-
8},{6-(8)-5},{8-(5)-500},{5-(500)-1},{500-(1)-600},{1-(600)-
XXX}]
Remove the node list.Last with list.Remove(list.Last)
:: SUCCESS: list's state [{XXX-(400)-20},{400-(20)-10},{20-
(10)-100},{10-(100)-2},{100-(2)-200},{2-(200)-6},{200-(6)-
8},{6-(8)-5},{8-(5)-500},{5-(500)-1},{500-(1)-XXX}]
Remove the node list.Before, which is before the node
containing element 2, with list.Remove(list.Before(...))
:: SUCCESS: list's state [{XXX-(400)-20},{400-(20)-10},{20-
(10)-2},{10-(2)-200},{2-(200)-6},{200-(6)-8},{6-(8)-5},{8-(5)-
500},{5-(500)-1},{500-(1)-XXX}]
Remove the node containing element 2 with list.Remove(...)
:: SUCCESS: list's state [{XXX-(400)-20},{400-(20)-10},{20-
(10)-200},{10-(200)-6},{200-(6)-8},{6-(8)-5},{8-(5)-500},{5-
(500)-1},{500-(1)-XXX}]
Test I: Remove the node containing element 2, which has been
recently deleted, with list.Remove(...)
:: SUCCESS: list's state [{XXX-(400)-20},{400-(20)-10},{20-
(10)-200},{10-(200)-6},{200-(6)-8},{6-(8)-5},{8-(5)-500},{5-
(500)-1},{500-(1)-XXX}]
Test J: Clear the content of the vector via calling vector.Clear();
:: SUCCESS: list's state []
Test K: Remove last element for the empty list with
list.RemoveLast()
:: SUCCESS: list's state []
------------------- SUMMARY -------------------
Tests passed: ABCDEFGHIJK
Running head: Crisis Negotiation 1
Crisis Negotiation
Name
Institution
Date
During a crisis negotiation, all that may seem to matter is
reaching a deal as quickly as possible. The desire to head off a
disaster may lead crisis negotiators to forego the usual comforts
of life, such as sleep, in their single-minded pursuit of their
goal.
Those appear to have been the conditions under which the
government of Greece and its European creditors negotiated a
definitive new bailout package for the financially troubled
nation back in 2015. After Greek voters rejected the deal on the
table in a referendum, Greece’s Prime Minister, Alexis Tsipras,
and his team headed back to Brussels for a 17-hour marathon
negotiating session to come to a new agreement.
The final deal gave Greece up to $98 billion but little else from
its wish list. The crisis leadership, including Euro group
president Jeroen Dijsselbloem and German Chancellor Angela
Merkel, emerged from their all-night negotiating session
looking “weary and red-eyed,” according to The Guardian.
The stress inherent in the typical crisis negotiation tends to
exacerbate conflict between parties, as each looks for reasons to
deflect the other party for what has gone wrong. This type of
blame game has been evident in the Greek financial crisis, with
Greeks blaming the Eurozone’s austerity measure for its
stagnant economy and European leaders accusing Greek
government leaders of failing to steer a clear course out of the
crisis.
Emotional stress also leads the average crisis negotiator to fall
back on stereotypes, including culturally based snap judgments,
Columbia University professor Michael Morris has found in his
research. And stress leads negotiators to claim less value than
they would when feeling more relaxed, Cornell University
professor Kathleen O’Connor and her colleagues have
found.Crisis negotiation skills can make or break a negotiator in
heated conflicts.
References
Crisis Negotiator Stress. (2011). Psychological Aspects of
Crisis Negotiation, Second Edition, 63-76. doi:10.1201/b11305-
9
Kingshott, B. F. (2005). Profiling in the Context of Crisis
Negotiations. Journal of Police Crisis Negotiations, 5(2), 5-36.
doi:10.1300/j173v05n02_02
Strentz, T. (2017). Non-Law Enforcement/Correctional Crisis
Negotiators. Psychological Aspects of Crisis Negotiation, 56-
65. doi:10.1201/9781315150581-8
https://www.pon.harvard.edu/daily/crisis-negotiations/in-
greece-crisis-negotiation-tough-conditions-may-have-affected-
the-deal/
Running head:
Crisis Negotiation
1
Crisis Negotiation
Name
Institution
Date

More Related Content

Similar to SIT221 Data Structures and Algorithms     Trimester 2, 2019 .docx

Link list
Link listLink list
Link list
zzzubair
 
3.ppt
3.ppt3.ppt
Data structure
 Data structure Data structure
Data structure
Shahariar limon
 
Linked Lists in Python, Python Institute in Delhi.pdf
Linked Lists in Python, Python Institute in Delhi.pdfLinked Lists in Python, Python Institute in Delhi.pdf
Linked Lists in Python, Python Institute in Delhi.pdf
ESS Institute
 
Fundamentals of data structures
Fundamentals of data structuresFundamentals of data structures
Fundamentals of data structuresNiraj Agarwal
 
Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm
KristinaBorooah
 
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Balwant Gorad
 
chapter three ppt.pptx
chapter three ppt.pptxchapter three ppt.pptx
chapter three ppt.pptx
selemonGamo
 
Static arrays are structures whose size is fixed at compile time and.pdf
Static arrays are structures whose size is fixed at compile time and.pdfStatic arrays are structures whose size is fixed at compile time and.pdf
Static arrays are structures whose size is fixed at compile time and.pdf
anjanacottonmills
 
Part2- The Atomic Information Resource
Part2- The Atomic Information ResourcePart2- The Atomic Information Resource
Part2- The Atomic Information ResourceJEAN-MICHEL LETENNIER
 
2 marks- DS using python
2 marks- DS using python2 marks- DS using python
2 marks- DS using python
LavanyaJ28
 
Data Structure.pptx
Data Structure.pptxData Structure.pptx
Data Structure.pptx
SajalFayyaz
 
Udemy talend notes
Udemy talend notesUdemy talend notes
Udemy talend notes
srikanthreddy938564
 
Data structure and algorithms chapter three LINKED LIST
Data structure and algorithms chapter three LINKED LISTData structure and algorithms chapter three LINKED LIST
Data structure and algorithms chapter three LINKED LIST
binakasehun2026
 
Towards a New Data Modelling Architecture - Part 1
Towards a New Data Modelling Architecture - Part 1Towards a New Data Modelling Architecture - Part 1
Towards a New Data Modelling Architecture - Part 1JEAN-MICHEL LETENNIER
 
Efficient & Lock-Free Modified Skip List in Concurrent Environment
Efficient & Lock-Free Modified Skip List in Concurrent EnvironmentEfficient & Lock-Free Modified Skip List in Concurrent Environment
Efficient & Lock-Free Modified Skip List in Concurrent Environment
Editor IJCATR
 
Linked List Static and Dynamic Memory Allocation
Linked List Static and Dynamic Memory AllocationLinked List Static and Dynamic Memory Allocation
Linked List Static and Dynamic Memory Allocation
Prof Ansari
 
Singly & Circular Linked list
Singly & Circular Linked listSingly & Circular Linked list
Singly & Circular Linked list
Khulna University of Engineering & Tecnology
 

Similar to SIT221 Data Structures and Algorithms     Trimester 2, 2019 .docx (20)

Link list
Link listLink list
Link list
 
3.ppt
3.ppt3.ppt
3.ppt
 
3.ppt
3.ppt3.ppt
3.ppt
 
Data structure
 Data structure Data structure
Data structure
 
Unit4
Unit4Unit4
Unit4
 
Linked Lists in Python, Python Institute in Delhi.pdf
Linked Lists in Python, Python Institute in Delhi.pdfLinked Lists in Python, Python Institute in Delhi.pdf
Linked Lists in Python, Python Institute in Delhi.pdf
 
Fundamentals of data structures
Fundamentals of data structuresFundamentals of data structures
Fundamentals of data structures
 
Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm
 
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
 
chapter three ppt.pptx
chapter three ppt.pptxchapter three ppt.pptx
chapter three ppt.pptx
 
Static arrays are structures whose size is fixed at compile time and.pdf
Static arrays are structures whose size is fixed at compile time and.pdfStatic arrays are structures whose size is fixed at compile time and.pdf
Static arrays are structures whose size is fixed at compile time and.pdf
 
Part2- The Atomic Information Resource
Part2- The Atomic Information ResourcePart2- The Atomic Information Resource
Part2- The Atomic Information Resource
 
2 marks- DS using python
2 marks- DS using python2 marks- DS using python
2 marks- DS using python
 
Data Structure.pptx
Data Structure.pptxData Structure.pptx
Data Structure.pptx
 
Udemy talend notes
Udemy talend notesUdemy talend notes
Udemy talend notes
 
Data structure and algorithms chapter three LINKED LIST
Data structure and algorithms chapter three LINKED LISTData structure and algorithms chapter three LINKED LIST
Data structure and algorithms chapter three LINKED LIST
 
Towards a New Data Modelling Architecture - Part 1
Towards a New Data Modelling Architecture - Part 1Towards a New Data Modelling Architecture - Part 1
Towards a New Data Modelling Architecture - Part 1
 
Efficient & Lock-Free Modified Skip List in Concurrent Environment
Efficient & Lock-Free Modified Skip List in Concurrent EnvironmentEfficient & Lock-Free Modified Skip List in Concurrent Environment
Efficient & Lock-Free Modified Skip List in Concurrent Environment
 
Linked List Static and Dynamic Memory Allocation
Linked List Static and Dynamic Memory AllocationLinked List Static and Dynamic Memory Allocation
Linked List Static and Dynamic Memory Allocation
 
Singly & Circular Linked list
Singly & Circular Linked listSingly & Circular Linked list
Singly & Circular Linked list
 

More from edgar6wallace88877

Write a page to a page and half for each topic and read each topic a.docx
Write a page to a page and half for each topic and read each topic a.docxWrite a page to a page and half for each topic and read each topic a.docx
Write a page to a page and half for each topic and read each topic a.docx
edgar6wallace88877
 
Write a page discussing why you believe PMI is focusing BA as the fi.docx
Write a page discussing why you believe PMI is focusing BA as the fi.docxWrite a page discussing why you believe PMI is focusing BA as the fi.docx
Write a page discussing why you believe PMI is focusing BA as the fi.docx
edgar6wallace88877
 
Write a page of personal reflection of your present leadership compe.docx
Write a page of personal reflection of your present leadership compe.docxWrite a page of personal reflection of your present leadership compe.docx
Write a page of personal reflection of your present leadership compe.docx
edgar6wallace88877
 
Write a page of compare and contrast for the Big Five Personalit.docx
Write a page of compare and contrast for the Big Five Personalit.docxWrite a page of compare and contrast for the Big Five Personalit.docx
Write a page of compare and contrast for the Big Five Personalit.docx
edgar6wallace88877
 
Write a page of research and discuss an innovation that includes mul.docx
Write a page of research and discuss an innovation that includes mul.docxWrite a page of research and discuss an innovation that includes mul.docx
Write a page of research and discuss an innovation that includes mul.docx
edgar6wallace88877
 
Write a page answering the questions below.Sometimes projects .docx
Write a page answering the questions below.Sometimes projects .docxWrite a page answering the questions below.Sometimes projects .docx
Write a page answering the questions below.Sometimes projects .docx
edgar6wallace88877
 
Write a one-paragraph summary of one of the reading assignments from.docx
Write a one-paragraph summary of one of the reading assignments from.docxWrite a one-paragraph summary of one of the reading assignments from.docx
Write a one-paragraph summary of one of the reading assignments from.docx
edgar6wallace88877
 
Write a one-paragraph summary of this article.Riordan, B. C..docx
Write a one-paragraph summary of this article.Riordan, B. C..docxWrite a one-paragraph summary of this article.Riordan, B. C..docx
Write a one-paragraph summary of this article.Riordan, B. C..docx
edgar6wallace88877
 
Write a one-paragraph response to the following topic. Use the MLA f.docx
Write a one-paragraph response to the following topic. Use the MLA f.docxWrite a one-paragraph response to the following topic. Use the MLA f.docx
Write a one-paragraph response to the following topic. Use the MLA f.docx
edgar6wallace88877
 
Write a one-page rhetorical analysis in which you analyze the argume.docx
Write a one-page rhetorical analysis in which you analyze the argume.docxWrite a one-page rhetorical analysis in which you analyze the argume.docx
Write a one-page rhetorical analysis in which you analyze the argume.docx
edgar6wallace88877
 
Write a one pageliterature review of your figure( FIGURE A.docx
Write a one pageliterature review of your figure( FIGURE A.docxWrite a one pageliterature review of your figure( FIGURE A.docx
Write a one pageliterature review of your figure( FIGURE A.docx
edgar6wallace88877
 
Write a one page-paper documenting the problemneed you wish to .docx
Write a one page-paper documenting the problemneed you wish to .docxWrite a one page-paper documenting the problemneed you wish to .docx
Write a one page-paper documenting the problemneed you wish to .docx
edgar6wallace88877
 
Write a one page report on Chapter 1 and 2 with the same style of mo.docx
Write a one page report on Chapter 1 and 2 with the same style of mo.docxWrite a one page report on Chapter 1 and 2 with the same style of mo.docx
Write a one page report on Chapter 1 and 2 with the same style of mo.docx
edgar6wallace88877
 
Write a one page reflection about the following1) Identify .docx
Write a one page reflection about the following1) Identify .docxWrite a one page reflection about the following1) Identify .docx
Write a one page reflection about the following1) Identify .docx
edgar6wallace88877
 
Write a one page paper on the question belowSome of the current.docx
Write a one page paper on the question belowSome of the current.docxWrite a one page paper on the question belowSome of the current.docx
Write a one page paper on the question belowSome of the current.docx
edgar6wallace88877
 
Write a one page paper (double spaced) describing and discussing the.docx
Write a one page paper (double spaced) describing and discussing the.docxWrite a one page paper (double spaced) describing and discussing the.docx
Write a one page paper (double spaced) describing and discussing the.docx
edgar6wallace88877
 
write a one page about this topic and provide a reference.Will.docx
write a one page about this topic and provide a reference.Will.docxwrite a one page about this topic and provide a reference.Will.docx
write a one page about this topic and provide a reference.Will.docx
edgar6wallace88877
 
Write a one or more paragraph on the following question below.docx
Write a one or more paragraph on the following question below.docxWrite a one or more paragraph on the following question below.docx
Write a one or more paragraph on the following question below.docx
edgar6wallace88877
 
Write a one or more page paper on the following belowWhy are .docx
Write a one or more page paper on the following belowWhy are .docxWrite a one or more page paper on the following belowWhy are .docx
Write a one or more page paper on the following belowWhy are .docx
edgar6wallace88877
 
Write a one page dialogue in which two characters are arguing but .docx
Write a one page dialogue in which two characters are arguing but .docxWrite a one page dialogue in which two characters are arguing but .docx
Write a one page dialogue in which two characters are arguing but .docx
edgar6wallace88877
 

More from edgar6wallace88877 (20)

Write a page to a page and half for each topic and read each topic a.docx
Write a page to a page and half for each topic and read each topic a.docxWrite a page to a page and half for each topic and read each topic a.docx
Write a page to a page and half for each topic and read each topic a.docx
 
Write a page discussing why you believe PMI is focusing BA as the fi.docx
Write a page discussing why you believe PMI is focusing BA as the fi.docxWrite a page discussing why you believe PMI is focusing BA as the fi.docx
Write a page discussing why you believe PMI is focusing BA as the fi.docx
 
Write a page of personal reflection of your present leadership compe.docx
Write a page of personal reflection of your present leadership compe.docxWrite a page of personal reflection of your present leadership compe.docx
Write a page of personal reflection of your present leadership compe.docx
 
Write a page of compare and contrast for the Big Five Personalit.docx
Write a page of compare and contrast for the Big Five Personalit.docxWrite a page of compare and contrast for the Big Five Personalit.docx
Write a page of compare and contrast for the Big Five Personalit.docx
 
Write a page of research and discuss an innovation that includes mul.docx
Write a page of research and discuss an innovation that includes mul.docxWrite a page of research and discuss an innovation that includes mul.docx
Write a page of research and discuss an innovation that includes mul.docx
 
Write a page answering the questions below.Sometimes projects .docx
Write a page answering the questions below.Sometimes projects .docxWrite a page answering the questions below.Sometimes projects .docx
Write a page answering the questions below.Sometimes projects .docx
 
Write a one-paragraph summary of one of the reading assignments from.docx
Write a one-paragraph summary of one of the reading assignments from.docxWrite a one-paragraph summary of one of the reading assignments from.docx
Write a one-paragraph summary of one of the reading assignments from.docx
 
Write a one-paragraph summary of this article.Riordan, B. C..docx
Write a one-paragraph summary of this article.Riordan, B. C..docxWrite a one-paragraph summary of this article.Riordan, B. C..docx
Write a one-paragraph summary of this article.Riordan, B. C..docx
 
Write a one-paragraph response to the following topic. Use the MLA f.docx
Write a one-paragraph response to the following topic. Use the MLA f.docxWrite a one-paragraph response to the following topic. Use the MLA f.docx
Write a one-paragraph response to the following topic. Use the MLA f.docx
 
Write a one-page rhetorical analysis in which you analyze the argume.docx
Write a one-page rhetorical analysis in which you analyze the argume.docxWrite a one-page rhetorical analysis in which you analyze the argume.docx
Write a one-page rhetorical analysis in which you analyze the argume.docx
 
Write a one pageliterature review of your figure( FIGURE A.docx
Write a one pageliterature review of your figure( FIGURE A.docxWrite a one pageliterature review of your figure( FIGURE A.docx
Write a one pageliterature review of your figure( FIGURE A.docx
 
Write a one page-paper documenting the problemneed you wish to .docx
Write a one page-paper documenting the problemneed you wish to .docxWrite a one page-paper documenting the problemneed you wish to .docx
Write a one page-paper documenting the problemneed you wish to .docx
 
Write a one page report on Chapter 1 and 2 with the same style of mo.docx
Write a one page report on Chapter 1 and 2 with the same style of mo.docxWrite a one page report on Chapter 1 and 2 with the same style of mo.docx
Write a one page report on Chapter 1 and 2 with the same style of mo.docx
 
Write a one page reflection about the following1) Identify .docx
Write a one page reflection about the following1) Identify .docxWrite a one page reflection about the following1) Identify .docx
Write a one page reflection about the following1) Identify .docx
 
Write a one page paper on the question belowSome of the current.docx
Write a one page paper on the question belowSome of the current.docxWrite a one page paper on the question belowSome of the current.docx
Write a one page paper on the question belowSome of the current.docx
 
Write a one page paper (double spaced) describing and discussing the.docx
Write a one page paper (double spaced) describing and discussing the.docxWrite a one page paper (double spaced) describing and discussing the.docx
Write a one page paper (double spaced) describing and discussing the.docx
 
write a one page about this topic and provide a reference.Will.docx
write a one page about this topic and provide a reference.Will.docxwrite a one page about this topic and provide a reference.Will.docx
write a one page about this topic and provide a reference.Will.docx
 
Write a one or more paragraph on the following question below.docx
Write a one or more paragraph on the following question below.docxWrite a one or more paragraph on the following question below.docx
Write a one or more paragraph on the following question below.docx
 
Write a one or more page paper on the following belowWhy are .docx
Write a one or more page paper on the following belowWhy are .docxWrite a one or more page paper on the following belowWhy are .docx
Write a one or more page paper on the following belowWhy are .docx
 
Write a one page dialogue in which two characters are arguing but .docx
Write a one page dialogue in which two characters are arguing but .docxWrite a one page dialogue in which two characters are arguing but .docx
Write a one page dialogue in which two characters are arguing but .docx
 

Recently uploaded

Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 

Recently uploaded (20)

Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 

SIT221 Data Structures and Algorithms     Trimester 2, 2019 .docx

  • 1. SIT221 Data Structures and Algorithms Trimester 2, 2019 1 Practical Task 5.1 (Pass Task) Submission deadline: 10:00am Monday, August 26 Discussion deadline: 10:00am Saturday, September 14 General Instructions The objective of this task is to study implementation of a Doubl y Linked List, a generic data structure capable to maintain an arbitrary number of data elements and support va rious standard operations to read, write, and delete data. Compared to other popular data structures, link ed list like data structures offer a number of advantages with respect to time complexity and practical appl ication. For example, where an array‐based data structure, such as a simple list (or a vector), requires a cont iguous memory location to store data, a linked list may record new data elements anywhere in the memo ry. This is achievable by encapsulation of a payload (the user’s data record) into a node, then connecting no des into a sequence via memory references (also known as links). Because of this, a linked list is not restric ted in size and new nodes can be added increasing the size of the list to any extent. Furthermore, it is al lowed to use the first free and available memory location with only a single overhead step of storing the
  • 2. address of memory location in the previous node of a linked list. This makes insertion and removal operatio ns in a linked list of a constant 1 time; that is, as fast as possible. Remember that these operations gene rally run in a linear n time in an array since memory locations are consecutive and fixed. A doubly linked list outperforms a singly linked list achieving b etter runtime for deletion of a given data node as it enables traversing the sequence of nodes in both directions , i.e. from starting to end and as well as from end to starting. For a given a node, it is always possible to reac h the previous node; this is what a singly linked list does not permit. However, these benefits come at the cost of extra memory consumption since one additional variable is required to implement a link to previous n ode. In the case of a simpler singly linked list, just one link is used to refer to the next node. However, traversi ng is then possible in one direction only, from the head of a linked list to its end. 1. To start, follow the link below and explore the functionality of t he LinkedList<T> generic class available within the Microsoft .NET Framework. https://msdn.microsoft.com/en‐au/library/he2s3bh7(v=vs.110).a spx. Because some operations that you are asked to develop in this task are similar to those in the LinkedList<T>, you may refer to the existing description of the class to get more insights about how your own code should work. 2.
  • 3. Explore the source code attached to this task. Create a new Micr osoft Visual Studio project and import the DoublyLinkedList.cs file. This file contains a template of th e DoublyLinkedList<T> class. The objective of the task is to develop the missing functionality of the class to obtain a fully‐functional data structure. Subsequently, import the Tester.cs file to the project to enable t he prepared Main method important for the purpose of debugging and testing the expected program clas s and its interfaces for runtime and logical errors. 3. Find the nested Node<K> class presented inside the DoublyLink edList<T> and learn its structure. This is a generic class whose purpose is to represent a node of a doubly li nked list. Think about it as an atomic data structure itself that serves the DoublyLinkedList<T> as a buildi ng block. In fact, a doubly linked list is a linear collection of data elements, whose order is not given by t heir physical positions in memory, for example like in arrays. Instead, each element points to the next (and the previous) one. It is a data structure consisting of a set of nodes which together represent a sequence. Generally, a node of a doubly linked list consists of a data record that holds a payload and two auxiliary pointers referring to the SIT221 Data Structures and Algorithms Trimester 2, 2019 2 preceding and succeeding nodes in the ordered sequence of node
  • 4. s constituting the linked list. The two pointers allow to navigate back and forth between two adjacent nodes. Note that the Node<K> class is ready for you to use. It provides the following functionality: value, Node<K> previous, Node<K> next) Initializes a new instance of the Node<K> class, containing the specified value and referring to previous and next arguments as nodes before and after the new node, respectively, in the sequence of the associated doubly linked list. Value Property. Gets or sets the value (payload) of type K contained i n the node. Next Property. Gets a reference to the next node in the DoublyLinked List<T>, or null if the current node is the last element of the DoublyLinkedList<T>. Previous Property. Gets a reference to the previous node in the DoublyLi nkedList<T>, or null if the current node is the first element of the DoublyLinkedList<T>. ToString() Returns a string that represents the current Node<K>. ToString( ) is the major formatting method in the .NET Framework. It converts an object to its string representation so t hat it is suitable for display. You may have already noticed that the Node<K> implements th e INode<K> interface, which is available
  • 5. in the attached INode.cs file. The reason for the use of the interf ace is that the Node<K> is a data structure internal to the DoublyLinkedList<T> class, thus an instance of t he Node<K> must not be exposed to the user. It must be hidden to protect an instance of the DoublyLinkedList<T> from potential corruption caused by the user’s activities. However, because a user needs a ccess to the data that the user owns and stores inside an instance of the DoublyLinkedList<T>, the Node <K> implements the interfaces that permits to read and set (write) the data. Check the INode<K> and see th at the only property it implies is Value of generic type K. 4. Proceed with the given template of the DoublyLinkedList<T> cl ass and explore the methods that it has implemented for you for the purpose of example, in particular: Initializes a new instance of the DoublyLinkedList<T> class tha t is empty. Property. Gets the first node of the DoublyLinkedList<T>. If th e DoublyLinkedList<T> is empty, the First property returns null. Property. Gets the last node of the DoublyLinkedList<T>. If the DoublyLinkedList<T> is empty, the Last property returns null. Property. Gets the number of nodes actually contained in the Do ublyLinkedList<T>.
  • 6. After(INode<T> node) Returns the node casted to the INode<T> that succeeds the speci fied node in the DoublyLinkedList<T>. If the node given as parameter is null, it throws the ArgumentNullExc eption. If the parameter is not in the current DoublyLinkedList<T>, the method throws the InvalidOperation Exception. INode<T> AddLast(T value) Adds a new node containing the specified value at the end of th e DoublyLinkedList<T>. Returns the new node casted to the INode<T> with the recorded value. SIT221 Data Structures and Algorithms Trimester 2, 2019 3 Find(T value) Finds the first occurrence in the DoublyLinkedList<T> that cont ains the specified value. The method returns the node casted to INode<T>, if found; otherwise, null. The Doubly LinkedList<T> is searched forward starting at First and ending at Last. ring ToString() Returns a string that represents the current DoublyLinkedList<T >. ToString() is the major formatting method in the .NET Framework. It converts an object to its string represen tation so that it is suitable for display.
  • 7. As part of the prepared DoublyLinkedList<T> class, you can als o observe a number of private properties and methods. An important aspect of the DoublyLinkedList<T> is the use of two auxiliary nodes: the Head and the Tail. The both are introduced in order to significantly si mplify the implementation of the class and make insertion functionality reduced just to a single method des ignated here as Node<T> AddBetween(T value, Node<T> previous, Node<T> n ext) In fact, the Head and the Tail are invisible to a user of the data structure and are always maintained in it, even when the DoublyLinkedList<T> is formally empty. When t here is no element in it, the Head refers to the Tail, and vice versa. Note that in this case the First and the Last properties are set to null. The first added node therefore is to be placed in between the Head and th e Tail so that the former points to the new node as the Next node, while the latter points to it as the Pr evious node. Hence, from the perspective of the internal structure of the DoublyLinkedList<T>, the First element is the next to the Head, and similarly, the Last element is previous to the Tail. Remember ab out this crucial fact when you design and code other functions of the DoublyLinkedList<T> in this task. The given template of the DoublyLinkedList <T> class should h elp you with development of its remaining methods. Therefore, explore the existing code as other methods are to be similar in terms of logic and implementation. 5. You must complete the DoublyLinkedList<T> and provide the f
  • 8. ollowing functionality to the user: Before(INode<T> node) Returns the node, casted to the INode<T>, which precedes the s pecified node in the DoublyLinkedList<T>. If the node given as parameter is null, the method throws the Argumen tNullException. If the parameter is not in the current DoublyLinkedList<T>, the method throws the InvalidOp erationException. AddFirst(T value) Adds a new node containing the specified value at the start of th e DoublyLinkedList<T>. Returns the new node casted to the INode<T> containing the value. AddBefore(INode<T> before, T value) Adds a new node before the specified node of the DoublyLinked List<T> and records the given value as its payload. It returns the newly created node casted to the INode<T>. If the node specified as an argument is null, the method throws the ArgumentNullException. If the node specified as argument does not exist in the DoublyLinkedList<T>, the method throws the InvalidOperation Exception. AddAfter(INode<T> after, T value) Adds a new node after the specified node of the DoublyLinkedL ist<T> and records the given value as its payload. It returns the newly created node casted to the INode<T>. If the node specified as argument is null, the method throws the ArgumentNullException. If the node specified as arg ument does not exist in the DoublyLinkedList<T>, the method throws the InvalidOperationException. Clear() Removes all nodes from the DoublyLinkedList<T>. Count is set
  • 9. to zero. For each of the nodes, links to the previous and the next nodes must be nullified. Remove(INode<T> node) Removes the specified node from the DoublyLinkedList<T>. If node is null, it throws the ArgumentNullException. If the node specified as argument does not exist in the DoublyLinkedList<T>, the method throws the InvalidOperationException. SIT221 Data Structures and Algorithms Trimester 2, 2019 4 RemoveFirst() Removes the node at the start of the DoublyLinkedList<T>. If the DoublyLinkedList<T> is empty, it throws InvalidOperationException. RemoveLast() Removes the node at the end of the DoublyLinkedList<T>. If the DoublyLinkedList<T> is empty, it throws InvalidOperationException. Note that you are free in writing your code that is private to the DoublyLinkedList<T> unless you respect all the requirements in terms of functionality and signatures of t he specified methods. 6. As you progress with the implementation of the DoublyLinkedL
  • 10. ist <T> class, you should start using the Tester class to thoroughly test the DoublyLinkedList<T> aiming on the coverage of all potential logical issues and runtime errors. This (testing) part of the task is as im portant as writing the DoublyLinkedList<T> class. The given version of the testing class covers only some b asic cases. Therefore, you should extend it with extra cases to make sure that your doubly linked list class i s checked against other potential mistakes. Further Notes Learn the material of chapters 3.4 and especially that of section 7.3.3 of the SIT221 course book “Data structures and algorithms in Java” (2014) by M. Goodrich, R. T amassia, and M. Goldwasser. You may access the book on‐line for free from the reading list application in CloudDeakin available in Resources Additional Course Resources Resources on Algorithms and Data Structures Course Book: Data structures and algorithms in Java. As a complementary material, to learn more about a singly linked and doubly linked lists, you may refer to Chapter 2 of SIT221 Work book available in CloudDeakin in Resources Additional Course Resources Resources on Algorithms and Data Structures SIT221 Workbook. If you still struggle with such OOP concepts as Generics and the ir application, you may wish to read Chapter 11 of SIT232 Workbook available in Resources Addit ional Course Resources Resources on Object‐Oriented Programming. You may also have to read
  • 11. Chapter 6 of SIT232 Workbook about Polymorphism and Interfaces as you need excellent understanding of these topics to progress well through the practical tasks of the unit. Make sure that you are pr oficient with them as they form a basis to design and develop programming modules in this and all the s ubsequent tasks. You may find other important topics required to complete the task, like exceptions handling, in other chapters of the workbook. We will test your code in Microsoft Visual Studio 2017. Find th e instructions to install the community version of Microsoft Visual Studio 2017 available on the SIT221 unit web‐page in CloudDeakin at Resources Additional Course Resources Software Visual Studio Community 2017. You are free to use another IDE if you prefer that, e.g. Visual Studio Code. But we recommend you to take a chance to learn this environment. Marking Process and Discussion To get your task completed, you must finish the following steps strictly on time. Make sure that your program implements all the required functi onality, is compliable, and has no runtime errors. Programs causing compilation or runtime errors will not be accepted as a solution. You need to test your program thoroughly before submission. Think about po tential errors where your program might fail.
  • 12. Submit your program code as an answer to the task via OnTrack submission system. Meet with your marking tutor to demonstrate and discuss your p rogram in one of the dedicated practical sessions. Be on time with respect to the specified discussion dea dline. SIT221 Data Structures and Algorithms Trimester 2, 2019 5 Answer all additional (theoretical) questions that your tutor can ask you. Questions are likely to cover lecture notes, so attending (or watching) lectures should help yo u with this compulsory interview part. Please, come prepared so that the class time is used efficiently a nd fairly for all the students in it. You should start your interview as soon as possible as if your answer s are wrong, you may have to pass another interview, still before the deadline. Use available attempts prop erly. Note that we will not check your solution after the submission d eadline and will not discuss it after the discussion deadline. If you fail one of the deadlines, you fail th e task and this reduces the chance to pass the unit. Unless extended for all students, the deadlines are strict to guarantee smooth and on‐time work
  • 13. through the unit. Remember that this is your responsibility to keep track of your progress in the unit that includes checking which tasks have been marked as completed in the OnTrack syst em by your marking tutor, and which are still to be finalised. When marking you at the end of the unit, we wil l solely rely on the records of the OnTrack system and feedback provided by your tutor about your overall progress and quality of your solutions. Expected Printout This section displays the printout produced by the attached Test er class, specifically by its Main method. It is based on our solution. The printout is provided here to help wit h testing your code for potential logical errors. It demonstrates the correct logic rather than an expected printou t in terms of text and alignment. Test A: Create a new list by calling 'DoublyLinkedList<int> vector = new DoublyLinkedList<int>( );' :: SUCCESS: list's state [] Test B: Add a sequence of numbers 2, 6, 8, 5, 1, 8, 5, 3, 5 with list.AddLast( ) :: SUCCESS: list's state [{XXX-(2)-6},{2-(6)-8},{6-(8)-5},{8- (5)-1},{5-(1)-8},{1-(8)-5},{8-(5)-3},{5-(3)-5},{3-(5)-XXX}] Test C: Remove sequentially 4 last numbers with list.RemoveLast( )
  • 14. :: SUCCESS: list's state [{XXX-(2)-6},{2-(6)-8},{6-(8)-5},{8- (5)-1},{5-(1)-XXX}] Test D: Add a sequence of numbers 10, 20, 30, 40, 50 with list.AddFirst( ) :: SUCCESS: list's state [{XXX-(50)-40},{50-(40)-30},{40- (30)-20},{30-(20)-10},{20-(10)-2},{10-(2)-6},{2-(6)-8},{6-(8)- 5},{8- (5)-1},{5-(1)-XXX}] Test E: Remove sequentially 3 last numbers with list.RemoveFirst( ) :: SUCCESS: list's state [{XXX-(20)-10},{20-(10)-2},{10-(2)- 6},{2-(6)-8},{6-(8)-5},{8-(5)-1},{5-(1)-XXX}] Test F: Run a sequence of operations: list.Find(40); :: SUCCESS: list's state [{XXX-(20)-10},{20-(10)-2},{10-(2)- 6},{2-(6)-8},{6-(8)-5},{8-(5)-1},{5-(1)-XXX}] list.Find(0); :: SUCCESS: list's state [{XXX-(20)-10},{20-(10)-2},{10-(2)- 6},{2-(6)-8},{6-(8)-5},{8-(5)-1},{5-(1)-XXX}] list.Find(2); :: SUCCESS: list's state [{XXX-(20)-10},{20-(10)-2},{10-(2)- 6},{2-(6)-8},{6-(8)-5},{8-(5)-1},{5-(1)-XXX}]
  • 15. Test G: Run a sequence of operations: Add 100 before the node with 2 with list.AddBefore(2,100) :: SUCCESS: list's state [{XXX-(20)-10},{20-(10)-100},{10- (100)-2},{100-(2)-6},{2-(6)-8},{6-(8)-5},{8-(5)-1},{5-(1)- XXX}] SIT221 Data Structures and Algorithms Trimester 2, 2019 6 Add 200 after the node with 2 with list.AddAfter(2,200) :: SUCCESS: list's state [{XXX-(20)-10},{20-(10)-100},{10- (100)-2},{100-(2)-200},{2-(200)-6},{200-(6)-8},{6-(8)-5},{8- (5)- 1},{5-(1)-XXX}] Add 300 before node list.First with list.AddBefore(list.First,300) :: SUCCESS: list's state [{XXX-(300)-20},{300-(20)-10},{20- (10)-100},{10-(100)-2},{100-(2)-200},{2-(200)-6},{200-(6)- 8},{6-(8)-5},{8-(5)-1},{5-(1)-XXX}] Add 400 after node list.First with list.AddAfter(list.First,400) :: SUCCESS: list's state [{XXX-(300)-400},{300-(400)- 20},{400-(20)-10},{20-(10)-100},{10-(100)-2},{100-(2)- 200},{2-(200)-
  • 16. 6},{200-(6)-8},{6-(8)-5},{8-(5)-1},{5-(1)-XXX}] Add 500 before node list.First with list.AddBefore(list.Last,500) :: SUCCESS: list's state [{XXX-(300)-400},{300-(400)- 20},{400-(20)-10},{20-(10)-100},{10-(100)-2},{100-(2)- 200},{2-(200)- 6},{200-(6)-8},{6-(8)-5},{8-(5)-500},{5-(500)-1},{500-(1)- XXX}] Add 600 after node list.First with list.AddAfter(list.Last,600) :: SUCCESS: list's state [{XXX-(300)-400},{300-(400)- 20},{400-(20)-10},{20-(10)-100},{10-(100)-2},{100-(2)- 200},{2-(200)- 6},{200-(6)-8},{6-(8)-5},{8-(5)-500},{5-(500)-1},{500-(1)- 600},{1-(600)-XXX}] Test H: Run a sequence of operations: Remove the node list.First with list.Remove(list.First) :: SUCCESS: list's state [{XXX-(400)-20},{400-(20)-10},{20- (10)-100},{10-(100)-2},{100-(2)-200},{2-(200)-6},{200-(6)- 8},{6-(8)-5},{8-(5)-500},{5-(500)-1},{500-(1)-600},{1-(600)- XXX}] Remove the node list.Last with list.Remove(list.Last) :: SUCCESS: list's state [{XXX-(400)-20},{400-(20)-10},{20- (10)-100},{10-(100)-2},{100-(2)-200},{2-(200)-6},{200-(6)- 8},{6-(8)-5},{8-(5)-500},{5-(500)-1},{500-(1)-XXX}] Remove the node list.Before, which is before the node
  • 17. containing element 2, with list.Remove(list.Before(...)) :: SUCCESS: list's state [{XXX-(400)-20},{400-(20)-10},{20- (10)-2},{10-(2)-200},{2-(200)-6},{200-(6)-8},{6-(8)-5},{8-(5)- 500},{5-(500)-1},{500-(1)-XXX}] Remove the node containing element 2 with list.Remove(...) :: SUCCESS: list's state [{XXX-(400)-20},{400-(20)-10},{20- (10)-200},{10-(200)-6},{200-(6)-8},{6-(8)-5},{8-(5)-500},{5- (500)-1},{500-(1)-XXX}] Test I: Remove the node containing element 2, which has been recently deleted, with list.Remove(...) :: SUCCESS: list's state [{XXX-(400)-20},{400-(20)-10},{20- (10)-200},{10-(200)-6},{200-(6)-8},{6-(8)-5},{8-(5)-500},{5- (500)-1},{500-(1)-XXX}] Test J: Clear the content of the vector via calling vector.Clear(); :: SUCCESS: list's state [] Test K: Remove last element for the empty list with list.RemoveLast() :: SUCCESS: list's state [] ------------------- SUMMARY ------------------- Tests passed: ABCDEFGHIJK
  • 18. Running head: Crisis Negotiation 1 Crisis Negotiation Name Institution Date During a crisis negotiation, all that may seem to matter is reaching a deal as quickly as possible. The desire to head off a disaster may lead crisis negotiators to forego the usual comforts of life, such as sleep, in their single-minded pursuit of their goal. Those appear to have been the conditions under which the government of Greece and its European creditors negotiated a definitive new bailout package for the financially troubled nation back in 2015. After Greek voters rejected the deal on the table in a referendum, Greece’s Prime Minister, Alexis Tsipras, and his team headed back to Brussels for a 17-hour marathon negotiating session to come to a new agreement. The final deal gave Greece up to $98 billion but little else from its wish list. The crisis leadership, including Euro group president Jeroen Dijsselbloem and German Chancellor Angela Merkel, emerged from their all-night negotiating session
  • 19. looking “weary and red-eyed,” according to The Guardian. The stress inherent in the typical crisis negotiation tends to exacerbate conflict between parties, as each looks for reasons to deflect the other party for what has gone wrong. This type of blame game has been evident in the Greek financial crisis, with Greeks blaming the Eurozone’s austerity measure for its stagnant economy and European leaders accusing Greek government leaders of failing to steer a clear course out of the crisis. Emotional stress also leads the average crisis negotiator to fall back on stereotypes, including culturally based snap judgments, Columbia University professor Michael Morris has found in his research. And stress leads negotiators to claim less value than they would when feeling more relaxed, Cornell University professor Kathleen O’Connor and her colleagues have found.Crisis negotiation skills can make or break a negotiator in heated conflicts. References Crisis Negotiator Stress. (2011). Psychological Aspects of Crisis Negotiation, Second Edition, 63-76. doi:10.1201/b11305- 9 Kingshott, B. F. (2005). Profiling in the Context of Crisis Negotiations. Journal of Police Crisis Negotiations, 5(2), 5-36. doi:10.1300/j173v05n02_02 Strentz, T. (2017). Non-Law Enforcement/Correctional Crisis Negotiators. Psychological Aspects of Crisis Negotiation, 56- 65. doi:10.1201/9781315150581-8 https://www.pon.harvard.edu/daily/crisis-negotiations/in- greece-crisis-negotiation-tough-conditions-may-have-affected- the-deal/ Running head: Crisis Negotiation