hi plz help. Trying since 1 week.
acwl1 line we
james line rx
sijith fff xw
nisha nnn w
/sijith line r
/Arjun line w
vineeth line r
acls2 faculty x
arrr line2 w
Rahul line3 wx
Arjun line1 m
/Tom line wr
ac01l2 lineN w
aclM1 line1 rw
Ram line3 x
acalM line2 rx
acblM line3
/jaffer line m
Ram line3 x
Here the line starting with / is command and others is arguments.
if any commands last word matches any letters of arguments last word it have to
print that argument(have to print only the first matching).
if one command preceeds other command then it have to check the same argumnets list above
Here "Arjun line w" matches "sijith fff xw" so it have to output that argument(not nisha nnn w)
eg:
" /sijith line r " matches "james line rx"
we have to output james line rw
if any command preceeds argument then it have to continue upto next command and check
the matching arguments inbetween two commands
eg:
Here /Arjun is preceeds by argument "vineeth line r" so continue upto command "/Tom line wr" and
check argument between Arjun and Tom and prints arrr line2 w
Every time have to check arguments inbetween commands