Skip to main content

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
43 views

Several programming languages support a calling convention wherein values are bound to parameters via a keyword, rather than position in a tuple of arguments. I'm curious whether there is any formal ...
Osr Workshops's user avatar
1 vote
1 answer
73 views

I want to perform large-scale image similarities detection. For context, I have a large database containing almost 13,000,000 flats. Every time a new flat is added to the database, I need to check ...
Guillaume M's user avatar
2 votes
0 answers
125 views

Let $S$ be a set of nodes belonging to a directed graph $G = (V,E)$. A vertex $v$ of $G$ is said to be reachable from $S$ if and only if $v \in S$, or if each predecessor of $v$ is reachable from $S$ ...
contrapunctus's user avatar
0 votes
1 answer
90 views

I'm working on implementing a mathematical approach to bit flipping in IEEE 754 FP16 floating-point numbers without using direct bit manipulation. The goal is to flip a specific bit (particularly in ...
Zak's user avatar
  • 1
0 votes
2 answers
133 views

My code for it: from math import gcd y = int(input()) w = int(input()) g = gcd(y, w) print(f"{y// g}/{w// g}") Could there be any other way of solving this problem without using gcd ?
user141710's user avatar
1 vote
2 answers
196 views

How can I find a non-exhaustive algorithm for the following problem? In the $N$-base number system, there are exactly $ N^{(N+1)} $ numbers with $N+1$ digits. I would like to select $N^2$ numbers such ...
László Szilágyi's user avatar
-4 votes
1 answer
111 views

How to write a Python Program for the following condition: Let me explain how I tried to write the code. $a=$ int$($input$($'enter the first integer between $1$ and $9$'$))$ $b=$ int$($input$($'enter ...
user avatar
0 votes
1 answer
80 views

I have the following Python (3.12) code for finding Fibonacci numbers recursively, and keeping track of how many times the function is called. ...
paw88789's user avatar
  • 103
1 vote
1 answer
106 views

Python has methods like getattr() which can be used to branch arbitrarily at runtime. As a result, static code analysis tools can't be certain what functions a ...
Travis's user avatar
  • 121
1 vote
1 answer
92 views

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 ...
Ellen Spertus's user avatar
1 vote
3 answers
395 views

I am confused about calculating the time complexity of the following function. ...
Skaeler's user avatar
  • 13
1 vote
1 answer
172 views

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 ...
Shiyao Ju's user avatar
0 votes
1 answer
153 views

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 : ...
nowox's user avatar
  • 295
0 votes
1 answer
127 views

I have an interesting real world problem. My brother is currently in school. The teachers perform the following procedure when giving him his grades. They take his list of grades ...
Pranav Jain's user avatar
1 vote
1 answer
93 views

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: ...
FaisalShakeel's user avatar

15 30 50 per page
1
2 3 4 5
16