Skip to content
Back to libraryPart 1 · Foundations

1.3Arrays and strings

Before you start

It helps to have read 1.1 Input and output and 1.2 Complexity and limits. Overall level: Foundation.

Practice: Arrays and strings

0 of 4 solved

About these problems

Apply, Connect, Reason and Stretch describe difficulty within this topic, not an official contest rating. Open any problem in any order; reading the chapter first is optional.

  1. 1Reverse the queuePrint an array in reverse order.ApplyNot started
  2. 2Longest signalA lowercase string records a sequence of signals. Print the longest consecutive run of one repeated character.ConnectNot started
  3. 3Rotate the displayMove the last element to the front k times. Print the resulting array. k may exceed the array length.ReasonNot started
  4. 4Row and column totalsGiven an n by m integer grid, print the sum of each row and then the sum of each column.StretchNot started

Read the lesson