search or DP
greedy