This was a question that was recently asked at a startup's interview. Can you please give me a hint about how to proceed (maybe using a greedy algo)?
I am given n ai's and n bi's and I have to maximise sum of (aixi^2+bix) where sum of xi's is <=k and each xi>=0 and is an integer. It is given that 1<=ai<=1000 and -1000<=bi<=1000.