Pagini recente » Diferente pentru utilizator/caheman intre reviziile 44 si 43 | Diferente pentru problema/snowball intre reviziile 29 si 30 | Diferente pentru utilizator/dariusdarius intre reviziile 88 si 87 | Diferente pentru runda/prosoft2017-9 intre reviziile 5 si 4 | Diferente pentru blog/square-root-trick intre reviziile 61 si 60
Nu exista diferente intre titluri.
Diferente intre continut:
bq. Given a set $S$ of $n$ points and a query point $p$, find the point in $S$ closest to $p$.
For uniformly distributed points, a good strategy is to represent the space as a grid and maintain a list of inner points for each cell. For a given query point, we can check the cell the point falls into and its neighbouring cells. For a $sqrt(n) * sqrt(n)$ grid we’ll have one point per cell, on average. On average, finding the point in $S$ closest to $p$, requires traversing a constant number of cells.
For uniformly distributed points, a good strategy is to represent the space as a grid and maintain a list of inner points for each cell. For a given query point, we can check the cell the point falls into and its neighbouring cells. For a $sqrt(n) * sqrt(n)$ grid we’ll have one point per cell, on average. So, on average, finding the point in $S$ closest to $p$, requires traversing a constant number of cells.
h2. Longest common subsequence solution
Nu exista diferente intre securitate.
Topicul de forum nu a fost schimbat.