# Questions tagged [algorithms]

An algorithm is a sequence of well-defined steps that defines an abstract solution to a problem. Use this tag when your issue is related to design and analysis of algorithms.

9,583 questions
Filter by
Sorted by
Tagged with
6 views

### Make Change in Linear Time

The question is motivated by this post on StackOverflow. Given an integer n and a finite list of distinct positive integers ds, ...
7 views

26 views

### Combining insertion/deletion operations in Levenshtein distance

Considering the definition below (with $d$ as distance, $w$ as operation weight/cost and $m$, $n$ being the string lengths), the operations $del$ and $ins$ seem to represent pretty much same thing ...
20 views

15 views

### mark sweep algorithm

Given the codes below for Mark-Sweep Algorithm, what are the state of the live objects prior to mark and sweep phase? Reference: True - has a marked bit False - has no marked bit for each root ...
18 views

### maximal independent set on grid graph proof

I'm trying to figure out proof of maximum independent set from: this link. (1b part). And I'm bit confused why exactly sum of $w(v)$ is less than or equal to sum of $w(v')$. Shouldn't it be other way ...
8 views

### I have just created a program to create a heap out of the input array, but my output does not match, please point the error [closed]

#include using namespace std; int swap(int dumb ,int i, int temp) { int jigle=(dumb+temp); (dumb+temp)=(dumb+i); *(dumb+i)=jigle; return 0; } int main() { int a={32,40,15,50,5,44}; int n=6; ...
39 views

### recursive algorithm to sort children and parents based on value

Edit: I dont have CS background and I'm still studying Algorithms, so any help will count! I met this algorithm while I was in interview, I didn't know what category it falls in, and hence I was ...
20 views

### Proving that $f(n) \not\in O(n)$ given that $f(n) \in \Theta(n^2)$ and the formal definitions of Big-Oh and Theta

So far I've understood that because of the definition of $\Theta$, we have $c_1n^2 \le f(n) \le c_2n^2$. I'm not sure how to proceed from there.