title: Interview question: data structure to set all values in O(1)
body: <p>I encountered the following interview question on the Internet.</p>
  
  <p><strong>Describe a data structure for which getValue(int index), setValue(int index, int value), and setAllValues(int value) are all O(1).</strong></p>
  
  <p>Though array is good enough for the first and second operations to be performed in O(1), what can be proposed for the third (setAllValues)?</p>