COP-3530, Fall 2015, Section: U01
Data Structures, Midterm Exam #1
(Proposed solutions)
1.
(a) Determine the worst case running time (the tightest bound possible) of the following
code in big-Oh notation in terms of the appropriate variables. Justify your
COP-3530, Spring 2015, Section: U03
Data Structures, Midterm Exam #1
(Proposed solutions)
1.
(a) For each function f(N) below, give an asymptotic upper bound using
big-Oh
notation. You should give the tightest bound possible (so giving O(2N) for every
que
Assignment/Homework #2
COP-3530, Fall 2015
Instructor: Dr. Antonio L. Bajuelos
Rules & Instructions:
This assignment has 3 problems.
Due date: Friday, October 2, 2015 at 5 pm (Eastern Time)
The assignment/homework will be submitted by email to [email protected]
Assignment/Homework #4
COP 3530, Fall 2015
Instructor: Dr. Antonio L. Bajuelos
Rules & Instructions:
Due date: Monday, Nov/23/2015 at 10 p.m. (Eastern Time)
This assignment has 2 problems.
The assignment/homework will be submitted by email to [email protected]
Assignment/Homework # 2
COP-3530, Spring 2015
(proposed solutions)
Problem 1.
(a) Complete this Java method so that it properly implements a swap between two
adjacent elements by adjusting only the links (and not the data) using a single
linked list.
/ be
Proposed Solutions to Assignment #1
COP 3530, Fall 2015, Instructor: Dr. Antonio L. Bajuelos
Problem #1. The Fibonacci sequence cfw_fibi1 is defined recursively as follows:
fib(1) = fib(2) = 1 and, fib(n) = fib(n-1) + fib(n-2) for n 3.
The numbers in the
COP-3530, Fall 2015, Section: U02,
Data Structures, Midterm Exam #1
(Proposed solutions)
1. Determine the worst case running time (the tightest bound possible) of the following
code in big-Oh notation in terms of the appropriate variables. Justify your an
COP-3530, Spring 2015, Section U04
Data Structures, Midterm Exam #1
(Proposed Solutions)
1.
The following routine removes the first half of the list passed as a parameter:
public static void removeFirstHalf( List<?> lst )
cfw_
int theSize = lst.size( ) /
Sorting (II)
Dr. Antonio L. Bajuelos
Note: The most of the information of these slides was extracted and adapted from Weisss book, Data
Structures and Algorithm Analysis in Java". They are provided for COP3530 students only. Not to be
published or publicl
Assignment/Homework #3
COP 3530, Fall 2015
Instructor: Dr. Antonio L. Bajuelos
Rules & Instructions:
Due date: Monday, Nov/2/2015 at 12 p.m. (Eastern Time)
This assignment has 3 problems.
The assignment/homework will be submitted by email to [email protected]
Assignment/Homework #1
COP-3530, Fall 2015
Instructor: Dr. Antonio L. Bajuelos
Rules & Instructions:
This assignment has 3 problems.
Due date: Wednesday, September 9th, 2015 at 4 pm (Eastern Time)
The assignment/homework will be submitted by email to abaj
COP-3530, Fall 2015, Section: U01
Data Structures, Midterm Exam #2
(with solutions)
1.
(a) Fill in the contents of the hash table below after inserting the items shown. To insert
the item k, use the hash function
k mod TableSize
and resolve collisions wit
COP-3530, Summer 2015, U01C
Data Structures, Midterm Exam #1
(proposed solutions)
1. Determine the worst case running time (the tightest bound possible) of the following
code in big-Oh notation in terms of the appropriate variables. Justify your answers.
COP-3530, Summer 2015, Section: U01C
Data Structures, Midterm Exam #2
(with solutions)
1. (20 points)
(a) Fill in the contents of the hash table below after inserting the items shown. To insert
the item k, use the hash function
k mod TableSize
and resolve
COP 3530, Spring 2015, Section: U03
Data Structures, Midterm Exam #2
(with solutions)
1. (20 points)
(a) Fill in the contents of the hash table below after inserting the items shown. To insert
the item k, use the hash function
k mod TableSize
and resolve
Proposed Solutions to Assignment #1
COP 3530, Instructor: Dr. Antonio L. Bajuelos
Problem #1. The Fibonacci sequence cfw_fibi1 is defined recursively as follows:
fib(1) = fib(2) = 1 and, fib(n) = fib(n-1) + fib(n-2) for n 3.
The numbers in the Fibonacci s
Assignment/Homework #2
COP-3530, Summer 2015
Instructor: Dr. Antonio L. Bajuelos
(proposed solutions)
Problem 1.
There are n items, numbered from 1 to n in a given array and given a positive integer
number k (k < n). We start from item number 1 and delete
Assignment/Homework # 1
COP-3530, Summer 2015
Instructor: Dr. Antonio L. Bajuelos
Proposed Solutions
Problem 1.
Implement a recursive search function in Java
int terSearch(int arr[], int l, int r, int x)
that returns location of x in a given array arr[lr]
Assignment/Homework #3
COP-3530, Summer 2015
(proposed solutions)
Problem 1.
(a) If you remove the minimum value from the following min-heap, then reorder to restore
the heap order, what heap do you get?
Solution:
(b) If you insert 10 into the following m
Hashing
Dr. Antonio L. Bajuelos
Note: The most of the information of these slides was extracted and adapted from Weisss book, Data
Structures and Algorithm Analysis in Java". They are provided for COP3530 students only. Not to be
published or publicly dis
Sorting (I)
Dr. Antonio L. Bajuelos
Note: The most of the information of these slides was extracted and adapted from Weisss book, Data
Structures and Algorithm Analysis in Java". They are provided for COP3530 students only. Not to be
published or publicly