Question: Unix, there are two common ways to execute a command: Entering its name, e . g . ep or 5 ;

Unix, there are two common ways to execute a command:
Entering its name, e.g."ep" or "5";
Entering "cindex". This notation is used to repeat the index"*(1-based) command since the start of the session. For example, suppose that the user has entered the following commands:
RULES
15
CP
INFO
!1
13
SETTINGS
"I" would trigger the execution of "15","I3" would repeat "av", and *16"
would execute "I" which in turn would trigger the execution of 15"
You are given a sequence of commands commands that the user has entered in the terminal since the start of the session. Each command can be one of the following
"",
"Is",
"av" or "/index". Calculate the number of times each ot "op",
"Is" and "mv" commands was executed and retum an aray of three integers in the
following form: It of times for "oP", l of tises for 15*,/ of tikes for

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!