algorithm tag

168 questions


1 answers
107 views
0
Depth priority search questions (game programming practice)

I'm solving the past questions of competition programming, but I don't get the output I expected from the test case.Why?This problem seems to be a problem for all exploration, so I try to solve it usi...

2 years ago

2 answers
89 views
0
implementation of the Dijkstra method

I implement the Dijkstra method in the Additional Challenge part of the main function, but I don't know how...Even if I look at the implementation method, I don't understand the meaning from から...impo...

2 years ago

1 answers
104 views
0
Understanding Dynamic Planning Divisions

Below is the problem of determining the number of divisions using dynamic planning.The following dp arrangement is defined and a gradualization formula is used to solve this problem, but there are thr...

2 years ago

1 answers
89 views
0
Understanding the Implementation of an Algorithm to Apply the Absorption of Logical Operations in Python

We have rewritten the following algorithms in Python that apply the absorption of logical operations implemented in Java: 1 Vector matrix = [a], [a, b], [a, c];2 for (inti=0;i<matrix.size();i++){3 ...

2 years ago

2 answers
123 views
0
How to show the average calculation of binary search trees

About how to show the average calculation of a binary search treeBased on the results of the image below, T(n)<4logn+1 was shown for all n, and it is said that the average depth of the tree is O(lo...

2 years ago

3 answers
86 views
0
About Recursive Functions

I don't understand the implementation of this problem, which is answered using a recursive function.The understanding of the recursive function itself is an understandable state of implementation, suc...

2 years ago

3 answers
129 views
0
I'd like to ask for the change and the number of coins.

I'd like to ask for the number of change bills and coins.I want to solve it with Ruby, but I don't know how to do it.The results of a 468 yen purchase and a 10,000 yen bill are as follows.Number of 5,...

2 years ago

5 answers
80 views
0
I want to find common elements among ascending arrays without duplication of their own elements.

I have a question about C language.There are two arrays A, B, each storing an integer, the number in the array is sorted in ascending order, and there are no overlapping numbers in the array A, which ...

2 years ago

2 answers
89 views
0
How to Find the Longest Path with Negative Weights

We would like to receive your ideas.For business purposes, I would like to find the longest path to the directed graph as shown below.I am thinking about it.①From to まで.The actual graph is more compli...

2 years ago

1 answers
86 views
0
What Causes ZeroDivisionError in Euclidean Intersection?

ZeroDivisionError: integer division or module by zeroHere's the code.def Euclidean_algo(m,n): while m%n!=0: m=n n = m%n else: return nm=int(input('the bigger int is:')n = int(input('the smaller int...

2 years ago
« - 3 - »

© 2024 OneMinuteCode. All rights reserved.