SuperJ6's blog

By SuperJ6, history, 6 weeks ago, In English,

I was wondering if there is any data structure for supporting editing elements, querying elements, and sorting sub-arrays, faster than the naive implementation.

For example, consider the starting array [3, 5, 2, 6, 9, 5, 1]. For a query, you want to sort the subarray between indices 1 and 5 (0 index inclusive). You are left with resulting array [3, 2, 5, 5, 6, 9, 1]. Now you want to query for element at index 4, which you print 6. Now query to change index 4 to 3 and query to print it, and you print 3.

Essentially you are supposed to maintain idea you are sorting so that you print correct element at index, but you don't want to actually sort the whole subarray every time obviously.

I thought I remembered hearing something about this, but can't find any resources so maybe i just made the idea it's possible up.

Read more »

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

By SuperJ6, history, 2 months ago, In English,

Hi y'all, I am wondering if you could give me some resources, I have been stuck for so long and need to learn your secrets.

Jk I know how to google ~and stalk reds~~

I am wondering how many of you were low rated and naive and once asked a question like this in a cf blog or similar, and are now what you would be what you consider good at cp.

I am curious because I'm convinced anyone who can't perform google searches can't become good at cp, and I've seen many blogs asking for help like this while barely solving any problems or trying to figure out for themselves, yet I don't think those blogged helped them improve as I don't recall anyone like that ever getting up to expert.

If you once asked for help without starting and are now successful, please tell me, as I am eager to see if I can be proved wrong.

Also my important tip to beginners is get good at googling and reading solutions while thinking how you could think of it on your own, that is the only two skills you really need to improve.

Read more »

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