GithubHelp home page GithubHelp logo

koldramke / rudolph-xmas-greetings Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 21 KB

Change the vowels positions of a sentence from the beginnig until the end

Java 100.00%
java christmas string-manipulation vowels

rudolph-xmas-greetings's Introduction

Rudolph Xmas Greetings

This code is part of the "Tech Challenge Series โ€“ Advent Calendar 2021" advanced by Blip.pt (developed by Devskiller). This task (Rudolph Christmas Greetings) is the second one of this challenge and had a deadline on 3rd December 2021. The first task can be found in here.

This year counting down to Christmas will be even funnier and Blip will be by your side the whole time with a variety of small programming puzzles and lots of prizes!

Task description

Rudolph likes to spice up his Christmas cards by messing around with the greetings text. He likes to move around with the vowels on the greetings to make them hard to read. When he wants to write a message he reverses the order of all the vowels making them a little hard to read.

For example the greeting "Merry Christmas & Happy New Year!" contains the vowels from the back "aeeaaie". He then writes the greeting replacing these vowels instead: "Marry Chrestmes & Happy Naw Yier!"

Write a program that will accept a greeting message and reverse the vowels in this manner.

Function signature
reverseVowels(String greeting) returns String

Examples:

reverseVowels("Merry Christmas & Happy New Year!") should return "Marry Chrestmes & Happy Naw Yier!"  
reverseVowels("James") should return "Jemas"  
reverseVowels("Bob") should return "Bob"  
reverseVowels("Unwrap yourself a joyful Christmas!") should return "anwrip yuorsalf e juyfol ChrastmUs!"  
reverseVowels("ZZZ") should return "ZZZ"  
reverseVowels("aeiou") should return "uoiea"  

Constraints

  • Length of input string can be in the range of 0 to 1,000 characters
  • Only english vowels are to be used: "aeiou" and "AEIOU"

rudolph-xmas-greetings's People

Contributors

koldramke avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.