Questions tagged [Algorithms] (2080)

3
answers

How to implement the algorithm of the Fibonacci search?

Good time of day. I did a lot of digging on the Internet and don't quite understand one thing. Search using the Fibonacci what is it like? I made a very simple program, and at first I thought that this is the same search.. But began to doubt and confused at the end. The program itself is simple and works, but in fact it is...
Earline asked April 19th 20 at 12:47
2
answers

Which algorithm to use to decode the data, which, in the transfer process deletes the bits (the data)?

Some error-correcting algorithm to use for decoding data in which, in the transfer process deletes the bits (the data)? The codec which that will restore. I need the name of this algorithm, software and other application are not needed. Thank you
Darren_Dooley asked April 19th 20 at 12:46
1
answer

How to define the visible edges of the polygon to a point on the plane?

How to determine the visible faces of the rectangle in the plane relative to the point? That is, there is a way to find the angle between the normal vector and the vector projection. If he blunt the edge apparently. The question how to find the normal vector, namely in what direction it is turned. Already read the 100,000 a...
eleanore.Schowalter19 asked April 19th 20 at 12:42
3
answers

Possible bleeding of the algorithms without a good knowledge of syntax?

Hi all. I'm studying js, for some time it has not returned. Recently, I saw some problem and was not able to do it. On the one hand is not enough knowledge of syntax, on the other I just didn't understand how to do it. Tell me is it possible bleeding of the algorithms without a good knowledge of syntax, how important algori...
Avery asked April 19th 20 at 12:32
4
answers

Generation city (procedural)?

Map 2D. There is a level square grid (green field) dimensions X*Y. Objects There is a set of objects to be tiling different types: 1. Construction - 3 figures, consisting of squares (analog: from "Tetris"). 2. Trees - 3, size: 1x1, 2x2, 3x3 3. Road - size: 3x3 (for one lane). 4. Pedestrian road - size: 2x2. Conditions: 1....
Litzy.McKenzie47 asked April 19th 20 at 12:32
0
answer

The comparison with -1?

How to check that the number modulo (modulo) will give -1 ? If I work with liboy, which can't prescribe obviously -1. Whether correctly if I compare the number with the (modulus - 1) == 0 - what is it?
cooper8 asked April 19th 20 at 12:29
4
answers

What is the algorithm of the movement of couriers for delivery from restaurants?

Good day! Sawing system of delivery of food from restaurants, like Yandex.Food or Deliveries. Accordingly, the desired algorithm, which is based on the data about orders and data on the location of couriers to give the couriers the optimal objectives for the next move. Thought maybe such algorithms is somewhere in public o...
ole24 asked April 19th 20 at 12:27
4
answers

What is the meaning of Z-buffering, as I imagine that scene with a couple of thousand polygons it for 10 years, won't draw?

I read about z-buffer, and these samples with 2 cubes, or 4 lines, just a question, what if there's, well, the usual gaming scene from Skyrim or any other game of the 21st century, there are several millions of faces, that is, 100 trees standing one after another, and that 99 trees will be outlined, and then blocked 100. O...
henri.Bergstr asked April 19th 20 at 12:16
1
answer

Consecutive units, why one solution works?

On Yandex.An interview is a simple task "B. sequential units". Link https://contest.yandex.ru/contest/8458/problems/B/ made two decisions in Java 8 The first passes all the tests on Yandex. public class Application { public static void main(String[] args) throws Exception { BufferedReader r = new BufferedReader(new Fil...
Deanna asked April 19th 20 at 12:08
2
answers

How to transfer data from children to parent in the tree object?

Good day, there's a object in the array [ { "id": 1, "parentid": null, "count": "0", "children": [ { "id": 2, "parentid": 1, "count": "89", "children": [ { "id": 3, "parentid": 2, "count": "19", "children": [ { "id": 5, "parentid": 3, "count": "205" }, { "id": 4, "parentid": 3, "count": "8" } ] } ] } ] } ]...
Dennis_Ma asked April 19th 20 at 12:06