1/20/2023 0 Comments Letter soup generatorI assume your teacher expects you to write an algorithm for scratch on your own. Please use Big-O notation to explain how long it takes your function to run in terms of the length of your message (m) and the number of letters in your bowl of soup (s).īelow is the code I have tried but it is not working as per the task:- def sol(alpha): The function should return True or False accordingly. The function should determine if you can write your message with the letters found in your bowl of soup. There is no guarantee that each letter occurs a similar number of times - indeed some letters might be missing entirely.It may be a very large bowl of soup containing many letters.All the letters found in your bowl of alphabet soup.Write a function that takes as input two strings: And of course, you want to know if you can construct a message from the letters found in your bowl. I have been given a task to solve in python, need a help as I am not able to get an output, below is the question: -Įveryone loves alphabet soup.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |