algorithm tag

168 questions


1 answers
44 views
0
C++ does not understand the role of temporary variables when implementing insertion sorting

I'm learning about insertion sorting, and I have one question, why should I use the variable temp?Insert Sort|Programming Place Plus Algorithms and Data Structure EditionCorrect behavior code:interry[...

2 years ago

1 answers
134 views
0
Calculated O(N/k) from k=1 to k=N

What do you want to doI would like to calculate the calculation amount when calculating O(N/k) from k=1 to k=N.(O is the order notation.) That's why I'm trying to ask for it as follows, but I'm in tro...

2 years ago

1 answers
126 views
0
In OpenGL, I want to cut the figure in a straight line drawn by the mouse, but I don't know the algorithm.

I would like to implement a program where OpenGL cuts the figure in a straight line drawn by the mouse.The OpenGL version is 4.6, but I'm studying a tutorial based on ver1.1 here (http://wisdom.sakura...

2 years ago

1 answers
44 views
0
Understanding Queue End Determination ~ Ring Buffer ~ Algorithms and Data Structures

Currently, I am reading the here article and do not know the criteria for determining the end of the ring buffer.#include<iostream># include <vector>using namespace std;constint MAX=100000...

2 years ago

1 answers
70 views
0
Using CRC32 and MD5 Differently

I think CRC32 and MD5 are both commonly used as hash algorithms?But how do you use it differently?

2 years ago

2 answers
40 views
0
How to create a unique ID, such as an order ID, that will be shown to users

If you want a unique ID inside the program, you will probably use UUID a lot, but If the number of digits is 32 and you show it to the user, it seems a little too complicated.In fact, the order ID you...

2 years ago

1 answers
40 views
0
Do you have a table comparing the execution speed between the four operations and the logical operations?

I'm thinking about accelerating the algorithm nowI would like to know if it can be accelerated from the calculation procedure easily.Therefore, we are looking for a universal and general comparison of...

2 years ago

2 answers
43 views
0
Understanding the Python Algorithm for Adding Inputs

In this way, what kind of program should I put together to add the input value?Please use Python as the language.Input values:200 300500100200output:200500100011001300

2 years ago

1 answers
43 views
0
ALGORITHM FOR OPTIMUM ARRANGEMENT OF GRAPHIC

I'm trying to create a mind map.I'm thinking of placing it according to the following rules.·Each element is rectangular·One root element·The child elements immediately below are arranged in a row hor...

2 years ago

1 answers
41 views
0
Time Limit Exceeded with Brute Force in LeetCode

I started LeetCode.As soon as possible, there was an error in Twosum, so please let me know.First, I wrote the following code in Brute Force.class Solution (object): defaulttwoSum(self, nums, target):...

2 years ago
« - 8 - »

© 2024 OneMinuteCode. All rights reserved.