Baiterr's blog

By Baiterr, history, 32 hours ago, In English

help pls

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
32 hours ago, # |
  Vote: I like it +2 Vote: I do not like it

Ternary search helps in such scenarios where the function is first increasing and then decreasing or first decreasing and then increasing

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

at linear functions the array is increase or decrease we use binary search but at quadratic function it decrease then increase or increase then decrease we use tirnary search u could see the visualization of a function at geogebra for example

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

Errichto's video about binary search is very helpful.

»
28 hours ago, # |
  Vote: I like it -7 Vote: I do not like it

You don't binary search. Instead, you use ternary search

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

thank you all

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

you can do binary search not on the initial array (for example $$$arr$$$), but on $$$arr_i - arr_{i+1}$$$. Firstly sign of this function will be negative, then positive, so you can use binary search

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

use binary search and Sparse Table

  • »
    »
    14 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Ah yes, a newbie doing binary search on Sparse Table, classic.

    I doubt a normal newbie has heard of Sparse Table.