2023 HUAWEI OD machine test real questions C language implementation [relatively open syllables]

  Table of contents

topic

train of thought

test center

Code


topic

Title description:

The structure of relatively open syllables is consonant + vowel (aeiou) + consonant (except r) + e
Common words have bike cake
Given a string, with spaces as separators
Reverse the letters of each word
If the word contains For example, numbers and other non-letters are not reversed.
After inversion, the number of substrings containing relatively open syllable structures is calculated
(some characters in continuous substrings can be repeated)

Input description
string separated by spaces to multiple words
length <10000 letters only consider lowercase

The output describes
 the number of substrings containing relatively open syllable structures

Example 1:
Input
  ekam a ekac
and output
  2
Explanation:
 After inversion, it becomes make a cake where make and cake are relative open syllable substrings, return 2

Example 2:
 Input
    !ekam a ekekac
 and output
     2
 means that
     after inversion, it is !eka

Guess you like

Origin blog.csdn.net/misayaaaaa/article/details/131711579