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 #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]
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
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]
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
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
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( ) /
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
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.
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
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
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
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, 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
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
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]