Answer:
<?php
function mostVowels($sentence) {
$sentence = preg_replace("/[^A-Za-z0-9 ]/", '', $sentence);
$words = explode(' ', $sentence);| let matrix = [ | |
| [0,0,0,0,0,0,0,0,0,0], | |
| [0,1,1,0,0,0,0,0,0,0], | |
| [0,1,1,0,0,0,0,0,0,0], | |
| [0,1,1,0,0,0,0,0,0,0], | |
| [0,1,1,0,0,0,0,0,0,0], | |
| [0,1,1,0,1,1,1,1,0,0], | |
| [0,1,1,0,1,1,1,1,0,0], | |
| [0,1,1,0,1,1,1,1,0,0], | |
| [0,0,0,0,0,0,0,0,0,0], |
| class DictionaryLookupTools(object): | |
| @staticmethod | |
| ''' Recursively finds a key in a dictionary ''' | |
| def find(key, dictionary): | |
| return list(_find(key, dictionary)) | |
| @staticmethod | |
| def _find(key, dictionary): | |
| if isinstance(dictionary, list): | |
| for d in dictionary: |
| # Path to your oh-my-zsh configuration. | |
| ZSH=$HOME/.oh-my-zsh | |
| # Set name of the theme to load. | |
| # Look in ~/.oh-my-zsh/themes/ | |
| # Optionally, if you set this to "random", it'll load a random theme each | |
| # time that oh-my-zsh is loaded. | |
| ZSH_THEME="bira" | |
| # Example aliases |
| raw_input = ["Buzz", "Fizz"] | |
| input = raw_input[0, 7] | |
| puts "For Input '#{raw_input.join(', ')}'" | |
| matchMe = ["Fizz", "Buzz", "Fizz", "Fizz", "Buzz", "Fizz", "FizzBuzz","Fizz", "Buzz", "Fizz", "Fizz", "Buzz", "Fizz", "FizzBuzz"] | |
| def real_index(index) | |
| real_indices = [3,5,6,9,10,12,15,18,20,21,24,25,27,30] | |
| multiplier = index/real_indices.size | |
| real_indices[index%14] + multiplier*27 #total loop is 27 | |
| end | |
| def sub_weight(start, length) |