Keyboard Mashings

Just a guy with a keyboard and some opinions

Hi, I'm David. Sometimes when I have an idea I mash my keyboard and then post the result. Here you can find keyboard mashings about my life, computers, and other stuff.


Tag: segment-tree

UVa 11235: Frequent values

  Tags: uva segment-tree

UVa 11235: Frequent values simplified problem statement: You are given an array of integers and a number of queries. Each query is in the form of two positive integers i and j, and your program must print the number of occurances of the most frequently occuring value in the array between indicies i and j, inclusive.


UVa 12532: Interval Product

  Tags: uva segment-tree

UVa 12532: Interval Product involves a clever application of segment trees. Abridged problem statement: You are given a list of integers and a number of queries. Each query can either change one integer in the list, or ask for the sign of the product between a range of indicies. Print out a string with the answers to all the queries concatenated together.


David Udelson
Cornell University '18
Ithaca, NY
My linkedin profile My github profile Contact me on twitter