## Midterm practice questions

Linked Lists 1. Write an algorithm to detect a cycle in a linked list. 2. Remove consecutive duplicate entries from

Read more
Skip to content
# Data-structures

##
Midterm practice questions

##
Practice Questions — Recursion

##
Code Notes: Linked List

##
Post-midterm review

##
Interesting linked list problems

Linked Lists 1. Write an algorithm to detect a cycle in a linked list. 2. Remove consecutive duplicate entries from

Read moreRecursion: 1. Write a recursive algorithm to perform x^n. 2. Write a recursive algorithm for binary search. 3. Given a number

Read moreTopics covered: Linked list encapsulation and operations Link to source code: http://www.cs.tufts.edu/comp/15/examples/linked_lists/sll.h #include <iostream> #include <cassert> using namespace std; /// Singly

Read moreAsymptotic complexity Big-oh notation Big-omega notation Big-theta notation Solving recurrence equations Problems: Solve the recursive equation: T(1) = 1; T(n)

Read more1. Write an algorithm to detect a cycle in a linked list. 2. Remove consecutive duplicate entries from a given

Read more