Exercises
Multiple Choice
Articles
Open Problems
Login
11 exercises
Tagged:
linear time algorithms
x
Start over
- to expand, or dig in by adding more tags and revising the query.
Sort By:
trending ▼
date
0
Undergraduate
By
Chandra Chekuri
on July 29, 2012 | Updated Dec. 6, 2017
Simple path containing three given nodes
Let \(G=(V,E)\) be an undirected graph. Describe a linear time algorithm that given \(G\) and three distinct nodes \(u,v,w\) decides whether there is a simple path in \(G\) that contains all of them.
Computer Science
Mathematics
Algorithms
Graph Theory
linear time algorithms
0
Undergraduate
By
Shiva Kintali
on June 8, 2012 | Updated Dec. 6, 2017
Linear time algorithms on trees
Let \(T(V,E)\) be a tree. Design linear time (i.e., \(O(|V|)\) time) algorithms for the following problems : Find an optimal vertex cover in \(T\). Find a maximum matching in \(T\). Find a maximum i…
Computer Science
Mathematics
Algorithms
Graph Theory
independent set
linear time algorithms
matching
trees
vertex cover
0
Undergraduate
By
Shiva Kintali
on July 10, 2012 | Updated Dec. 6, 2017
Diameter of a tree
Let \(T(V, E)\) be a tree given as an adjacency list. For vertices \(u, v \in V\), let \(d(u, v)\) denote the length of the path from \(u\) to \(v\) in \(T\). Give a linear-time algorithm to determine…
Computer Science
Mathematics
Algorithms
Graph Theory
linear time algorithms
trees
0
Undergraduate
By
Shiva Kintali
on May 19, 2013 | Updated Dec. 6, 2017
Reverse a linked list
Design a \(\Theta(n)\)-time nonrecursive algorithm that reverses a singly linked list of \(n\) elements. The algorithm should use no more than constant space beyond that needed for the list itself.
Computer Science
Algorithms
Data Structures
linear time algorithms
linked list
0
Undergraduate
By
Shiva Kintali
on July 2, 2012 | Updated Dec. 6, 2017
Linear time tree isomorphism
Let \(T_1 (V_1,E_2)\) and \(T_2(V_2,E_2)\) be two undirected unlabeled trees. Design a linear-time algorithm to decide if \(T_1\) is isomorphic to \(T_2\).
Computer Science
Mathematics
Algorithms
Graph Theory
graph isomorphism
linear time algorithms
trees
0
Undergraduate
By
Jagadish
on Nov. 3, 2012 | Updated Dec. 6, 2017
Array to Histogram
Given an array A[1..n] containing integers between 1 to n, transform the array to contain counts of each number in their respective positions. Your algorithm should run in linear time and constant ext…
Computer Science
Algorithms
linear time algorithms
0
Undergraduate
By
Shiva Kintali
on June 8, 2012 | Updated Dec. 6, 2017
Block Decomposition in Linear Time
A block of a graph \(G\) is a maximal connected subgraph of \(G\) that has no cut-vertex. If \(G\) itself is connected and has no cut-vertex then \(G\) is a block. Design a linear time algorithm to …
Computer Science
Mathematics
Algorithms
Graph Theory
depth first search
linear time algorithms
0
Undergraduate
By
Shiva Kintali
on May 19, 2013 | Updated Dec. 6, 2017
Maximum subarray problem
Given a array \(A\) of \(n\) integers (containing at least one positive number), the maximum subarray problem is the task of finding the contiguous non-empty subarray within \(A\) which has the larges…
Computer Science
Algorithms
linear time algorithms
0
Undergraduate
By
Shiva Kintali
on July 21, 2012 | Updated Dec. 6, 2017
Linear time shuffling
Consider the following algorithm to shuffle an array \(A\) of \(n\) elements (with indices from \(0\) to \(n-1\) : for \(i = 0\) to \(n - 1\) Let j be a random integer between 0 and i exchange A…
Computer Science
Randomized Algorithms
linear time algorithms
0
Graduate
By
Shiva Kintali
on June 7, 2012 | Updated Dec. 6, 2017
Recognizing series-parallel graphs in linear time
Let \(G(V,E)\) be a simple undirected graph with \(|V| = n\) and \(|E| = m\). Let the treewidth of \(G\) be at most \(k\). Derive a tight upper bound of \(m\) in terms of \(n\) and \(k\). Show that …
Computer Science
Mathematics
Algorithms
Graph Theory
chordal graph
linear time algorithms
series parallel
treewidth
1
2
next page »
icon
Sign In or Sign Up
icon
Invite Friends
Post Something
x
Select What You'd Like To Post
POST AN ARTICLE
POST AN OPEN PROBLEM
POST AN EXERCISE
POST A MULTIPLE-CHOICE QUESTION
Content Types
Articles
Open Problems
Exercises
Multiple-Choice Questions
Levels
High school
Undergraduate
Graduate
Subjects
Mathematics
Computer Science
Puzzles
Optimization
Trending tags
counting
perfect square
primes
axiom of choice
circuit complexity
lower bound
monotone function
arithmetic progression
jee
jee 2016
Topics
Algebra
Algorithms
Approximation Algorithms
Calculus
Combinatorial Optimization
Combinatorics
Complexity Theory
Data Structures
Discrete Mathematics
Game Theory
Geometry
Graph Theory
Linear Algebra
Linear Programming
Logic
Mathematical Analysis
Mathematics
Matrix Theory
Number Theory
Optimization
Probability
Programming
Puzzles
Randomized Algorithms
Real Analysis
Trigonometry
×