Categories
Coderbyte Data Structures and Algorithms Easy LeetCode

[Coderbyte] – Ex Oh [Easy]

The Ex Oh Coderbyte challenge checks if there is an equal number of x’s and o’s in a given string. The requirements of the problem are as follows: Have the function ExOh(str) take the str parameter being passed and return the string true if there is an equal number of x‘s and o‘s, otherwise return the string false. Only these two letters will be […]

Categories
Coderbyte Data Structures and Algorithms Easy Python

[Coderbyte] – First Factorial [Easy]

The next challenge asks us to write a function that takes a number and returns the factorial of it. The text below is taken straight from Coderbyte: Have the function FirstFactorial(num) take the num parameter being passed and return the factorial of it. For example: if num = 4, then your program should return (4 * 3 * 2 * 1) = 24. […]

Categories
Coderbyte Data Structures and Algorithms Easy Python Uncategorized

[Coderbyte] – Array Addition I [Easy]

I want to start this post by mentioning that I have moved from LeetCode to Coderbyte for a while. The reason for doing so is because Coderbyte offers a discount on the premium plan for students. The premium membership offers access to all the coding challenges (200+), and it offers step-by-step solutions as well. Also, […]

Categories
Data Structures and Algorithms Easy LeetCode Python

[LeetCode] – Jewels and Stones [Easy]

The challenge I am going to explain is the Jewels and Stones challenge, which, by the way, is a concise one. The description of the problem is as follows: You’re given strings J representing the types of stones that are jewels, and S representing the stones you have.  Each character in S is a type of stone you have.  You want […]

Categories
Data Structures and Algorithms Easy LeetCode Python

[LeetCode] – Unique Email Addresses [Easy]

Another challenge I have enjoyed solving is finding all the unique email addresses. I have just copied and pasted the description from LeetCode, as it does a better job explaining the problem than me.  Every email consists of a local name and a domain name, separated by the @ sign. For example, in alice@leetcode.com, alice is the local […]

Categories
Data Structures and Algorithms Easy LeetCode Python

[LeetCode] – Reverse Words in a String III [Easy]

The next challenge I am going to explain is how to reverse the words in a String. This one is a little bit tricky because we have to take into account the whitespace and the initial order of the words. Below we have the challenge: Given a string, you need to reverse the order of […]

Categories
Data Structures and Algorithms Easy LeetCode Python

[LeetCode] – To Lower Case [Easy]

Today I am going to talk about how I have implemented the lowercase problem from LeetCode. To have all the information in one place and to avoid moving from one page to another, I have copied the problem below. Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. Example […]