Computers and Technology, 06.09.2021 22:00 calwhite216
JavaScript
You are developing a new programming language and currently working on variable names. You have a list of words that you consider to be good and could be used for variable names. All the strings in words consist of lowercase English letters.
A complex variable name is a combination (possibly with repetitions) of some strings from words, written in CamelCase. In other words, all the strings are written without spaces and each string (with the possible exception of the first one) starts with a capital letter.
Your programming language should accept complex variable names only.
You need to check if the variableName is accepted by your programming language.
Example
For words = ["is", "valid", "right"] and variableName = "isValid", the output should be camelCaseSeparation(words, variableName) = true.
As variableName consists of words "is" and "valid", and both of them are in words.
For words = ["is", "valid", "right"] and variableName = "IsValid", the output should be camelCaseSeparation(words, variableName) = true.
Note that both variants: "IsValid" and "isValid" are valid in CamelCase.
For words = ["is", "valid", "right"] and variableName = "isValId", the output should be camelCaseSeparation(words, variableName) = false.
variableName is separated to words "is", "val", "id", and not all words are in words.
Input/Output
[execution time limit] 4 seconds (js)
[input] array. string words
An array of words consisting of lowercase English letters.
Guaranteed constraints:
1 ≤ words. length ≤ 103.
[input] string variableName
A string to be checked. Consists of lowercase and uppercase English letters only.
Guaranteed constraints:
1 ≤ variableName. length ≤ 103.
[output] boolean
Return true, if variableName is a complex variable name, and false otherwise.
Answers: 1
Computers and Technology, 23.06.2019 06:40
How many nibbles can be stored in a 16-bit word?
Answers: 1
Computers and Technology, 23.06.2019 09:50
Allison and her group have completed the data entry for their spreadsheet project. they are in the process of formatting the data to make it easier to read and understand. the title is located in cell a5. the group has decided to merge cells a3: a7 to attempt to center the title over the data. after the merge, allison points out that it is not centered and looks bad. where would the title appear if allison unmerged the cells in an attempt to fix the title problem?
Answers: 2
Computers and Technology, 24.06.2019 00:50
Which player type acts on other players? a. killer b. achiever c. explorer d. socializer
Answers: 1
Computers and Technology, 24.06.2019 02:20
The first time a user launches the powerpoint program, which view is shown allowing the user to access recent presentations or create new presentations based on templates?
Answers: 1
JavaScript
You are developing a new programming language and currently working on variable names....
Mathematics, 21.10.2020 02:01
Mathematics, 21.10.2020 02:01
Mathematics, 21.10.2020 02:01
Mathematics, 21.10.2020 02:01
English, 21.10.2020 02:01
English, 21.10.2020 02:01
Arts, 21.10.2020 02:01
Mathematics, 21.10.2020 02:01
Health, 21.10.2020 02:01
Computers and Technology, 21.10.2020 02:01