This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Lets say you have an array with a list of sub strings. Write a function that takes an input string and return true if the string can be divided into substrings contained in the array. | |
Example: array: [‘and’, ‘the’, ‘back’, ‘front’, ‘ory’ , ‘end’, ‘po’ , ‘pu’, ‘lar’] | |
function subDivideString(inputString): | |
if inputString ==’backend’ return true since array has ‘back’ , ‘end’ | |
if inputString == ‘popular’ return true since array has ‘po’ , ‘pu’, ‘lar’ | |
if inputString == ‘backwards’ return false since array doesnt have ‘wards’ | |
if inputString == ‘swapan’ return false since array doesnt have any part of the word. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi, | |
I have just started learning ansible. I have written a simple playbook which will create , delete a server using ansible's ec2 module. I can also create a volume and attach it to a previously created instance. | |
--- | |
- name: Sample playbook for Amazon AWS ec2 management via ansible | |
hosts: local | |
connection: local | |
vars: | |
aws_access_key: xxxx |