-
Notifications
You must be signed in to change notification settings - Fork 20.4k
Open
Labels
Description
What would you like to Propose?
Hey,
More codes can be added to the string folder of the repo which are as follows:
- Removing stars from a string.
- Complex number multiplication.
Issue details
- Removing stars from the string.
You are given a string s, which contains stars *.
In one operation, you can:
- Choose a star in s.
- Remove the closest non-star character to its left, as well as remove the star itself.
- Return the string after all stars have been removed.
Note:
The input will be generated such that the operation is always possible.
It can be shown that the resulting string will always be unique.
Example :
Input: s = "leet**cod*e"
Output: "lecoe"
- Complex Number multiplication.
A complex number can be represented as a string on the form "real+imaginaryi" where:
- real is the real part and is an integer in the range [-100, 100].
- imaginary is the imaginary part and is an integer in the range [-100, 100].
- i2 == -1.
Given two complex numbers num1 and num2 as strings, return a string of the complex number that represents their multiplications.
Example :
Input: num1 = "1+1i", num2 = "1+1i"
Output: "0+2i"
Additional Information
I can help you with this. Therefore, I request you to assign this issue to me.