SELECT AVG(REGEXP_COUNT(REPLACE(SYS_CONNECT_BY_PATH(f,','),','),'THH'))
FROM (SELECT 'H' f FROM DUAL UNION ALL SELECT 'T' f FROM DUAL)
WHERE LEVEL=9
CONNECT BY LEVEL<=9;
The string ABCDEF corresponds to four numbers in which three commas and the representation of exponents are hidden. What is the maximum number of quadruples represented in this way?
If the same question was asked for the string ABCD and two numbers then the answer would be 14.