# Questions tagged [python]

Programming questions are off-topic here. Do not ask questions about how to write code in Python. However, conceptual questions about computer science are more appropriate. See our help center for the scope of this site.

220 questions
Filter by
Sorted by
Tagged with
1 vote
22 views

### Do edge lists have O(E) storage if default values are used for absent keys?

Ordinarily, edge list representations of graphs take $O(V+E)$ space, where $V$ is the number of vertices and $E$ is the number of edges. For example, consider a graph with 5 nodes and a single edge ...
1 vote
127 views

### Diffucuty in understanding code after a recursive call

This is an example algorithm of a recursive insertion sort I'm trying to understand. I've have tried understanding this with the help of print statements (which I've commented). ...
55 views

### fast estimation of the amount of unique combinations

Let's say I have a set of two columns - Name, Surname. I have a list of possible values for Name -> Jacob, John Surname -> Mayerson, Kindle. I want to generate a set of unique combinations for ...
1 vote
171 views

### When do we multiply or add the time complexities of loops?

I am confused about calculating the time complexity of the following function. ...
38 views

### Improve performances of Gauss-Jordan (XOR-SAT) Algorithm?

In this question I was looking for an algorithm to solve what seems to be a XOR-SAT problem. Let's consider this equation system : ...
1 vote
102 views

### Using XOR operation, a MOD operation compute a function f(n)

I had a difficult assignment in my Data Structures and Algorithms class. We need to implement a program that computes a function f(n) based on the following known values of n and f(n): n : 9689 ...
1k views

### Dynamic Programming - Difficult Jumping Frog Problem

Given a set of $n$ stones, arranged in a row at equal distances from each other. The stones are numbered from $0$ to $n-1$. A frog that is on stone number $0$ has to get to stone number $n-1$. A jump ...
1 vote
20 views

### Generate product description from product specifications

I am looking for a python NLP library that can generate a proper product description based on product features provided to it. Till now, i have tried transformers library and this is the code: ...