RE_Prince's blog

By RE_Prince, history, 3 days ago, In English

Just curious, I like binary search best :)

  • Vote: I like it
  • +13
  • Vote: I do not like it

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

I don't know any

  • »
    »
    3 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Same, but am learning a few basic algorithm as need to in GCSE computing.

»
3 days ago, # |
  Vote: I like it +8 Vote: I do not like it

Sqrt decomposition

»
3 days ago, # |
  Vote: I like it +6 Vote: I do not like it

Data Structures(especially segment tree)

»
3 days ago, # |
  Vote: I like it +3 Vote: I do not like it

My favourite algorithm is SPFA (or FFT)

»
3 days ago, # |
  Vote: I like it +21 Vote: I do not like it

As a saying goes, "Stop learning useless algorithms, go and learn using binary search."

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Even after a lot of practice I can say Binary search is something that still is quite difficult for me. My entire intuition for bs is if I can't solve it using greedy, dp or precomputation then it surely is bs.

»
3 days ago, # |
  Vote: I like it +3 Vote: I do not like it

Segment Tree

»
3 days ago, # |
Rev. 2   Vote: I like it +4 Vote: I do not like it

Simulation "algorithm". Especially in the CNOI competition system, a big simulation problem is really fun.

It doesn't require brain to think, but it does require too much time to debug. Today I just spend the first 3 hours in a 4-hour contest and get the 100 AC for this problem. (And used the rest hour to get the other 300pts) I feel like I was almost getting WA because the sample datas (just like pretests in CF, we can't get feedback of submissions in CNOI) were much too weak.

Honestly, simulating algorithms is a time-consuming and thankless approach. Once you make a small mistake in hundreds of lines of code but fail to find it, or even didn't plan to find any because you have passed the sample, then you are all done.

But why, you can't say that you can't solve it because you haven't learned enough, the hardest part in my 400-line code is calculate LCA in O(logn). Exciting and annoying, but I just like it best.

  • »
    »
    2 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I also like implementation and simulation :) I really enjoy the debugging process

»
3 days ago, # |
Rev. 2   Vote: I like it +13 Vote: I do not like it

DINIC Network Flow of course!!!!

»
3 days ago, # |
  Vote: I like it +8 Vote: I do not like it

DP or Tarjan :)

»
3 days ago, # |
  Vote: I like it +2 Vote: I do not like it

MO algorithm

»
3 days ago, # |
  Vote: I like it +1 Vote: I do not like it

DP and sqrt decomposition

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

SortedList

»
3 days ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Network flow. Problems needs skill, and the proof of correctness of Ford-Fulkerson method and complexity of Highest Label Preflow Push are ingenious. Also like string-related automatons.

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Binary search

»
3 days ago, # |
  Vote: I like it +1 Vote: I do not like it

binary search.

»
3 days ago, # |
  Vote: I like it +3 Vote: I do not like it

BST, especially Balanced Tree.

In CNOI system, the most common Balanced Tree is FHQ Treap ( a special implementation of Treap which is easy to understand and debug ) , and Splay is seen often, too. But I enjoy the moment that my Weight Balanced Leafy Tree gets better speed than other's Treap or Splay.

There's many kinds of Balanced Tree and each of them has their own peculiarity. Some is easy to write, and others are the basis of other algorithms, such as Splay for Link-Cut Tree, and it's fun to learn all of them.

But could data structures be called "algorithm"? Actually I ofter tell them apart. I choose a ds just because I saw someone do that in the comments section.

»
3 days ago, # |
  Vote: I like it +3 Vote: I do not like it

KMP SEARCH

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

My favorite algorithm is sort

see in this blog About the limits of the sorting problems.

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

kruskal MST

»
3 days ago, # |
Rev. 2   Vote: I like it -17 Vote: I do not like it

I wonder why no people replied me.

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Only algo I know is Sieve

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

i only love data structure!

»
2 days ago, # |
  Vote: I like it +3 Vote: I do not like it

kadane's algorithm for sure!!

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Hashing Algorithm <3

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Binary Search

»
2 days ago, # |
  Vote: I like it +1 Vote: I do not like it

Algorithm that I make while solving 1000 rated problems:

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

vjudje algorithms

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

does dfs count?

»
2 days ago, # |
  Vote: I like it +4 Vote: I do not like it

I think FFT is a beautiful algorithm, but unfortunately I've never been good enough to actually use it to solve anything :)

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Kruskal Reconstruction Tree and Treap

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

ternary search

»
2 days ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

Probably greedy algorithm or binary search

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

DSU dinic mcmf

»
2 days ago, # |
  Vote: I like it +5 Vote: I do not like it

bogosort

spoiler
»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Fandalma's algorithm

»
2 days ago, # |
  Vote: I like it +1 Vote: I do not like it

For Loop

»
2 days ago, # |
  Vote: I like it +9 Vote: I do not like it

Not really an algorithm, but Sprague-Grundy is pretty beautiful :)

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Lee(aka bfs on grid)

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Ad Hoc

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Z — algo

»
2 days ago, # |
  Vote: I like it +5 Vote: I do not like it

Iterative Segment tree — It is short to implement and you can cheese a lot of stuff with it since it is pretty light

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Thx for everyone's comments! I've never even heard of some of them

»
43 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

If statement

»
40 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

I'm a boruvka enjoyer. It clears prim and kruskal

»
39 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

hashing !

»
37 hours ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Honestly, Programming is the best algorithm that everyone uses. You can't tell me that you don't know this algorithm. And to solve every problem, you need this insanely hard algorithm.

Edit: this is my second favourite algo:

i++;

(surely this is the hardest algo ever)

»
37 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Sieve of Eratosthenes

»
37 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Surprised no one has mentioned Fenwick/binary indexed tree yet :)

»
37 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

dp or data structures.

»
36 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

binary search an dp <3 !

»
36 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

link-cut tree! the implementation is so elegant!

»
36 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Haha It must be Dijkstra.Few years ago I spent a whole afternoon learning it(also how to store a graph with linked list) with my friends.I enjoy and miss that time.

»
35 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

of course, florrfloor sum.

»
35 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Dunno why guys, but I love using CBT on problems.

»
24 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

SATT AAAT and ETT

»
24 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

simulated annealing and binary search

»
21 hour(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

binary search and sieve I like both of them

»
21 hour(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

parallel binary search, FFT, sqrt decomposition, centroid decomposition and math-related dp probably