Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My Q1.1 and Q1.3 solutions #8

Merged
merged 4 commits into from
Oct 21, 2021
Merged

My Q1.1 and Q1.3 solutions #8

merged 4 commits into from
Oct 21, 2021

Conversation

ele7ija
Copy link
Contributor

@ele7ija ele7ija commented Oct 8, 2021

No description provided.

Copy link
Owner

@krlv krlv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ele7ija thanks for you contribution!
PR looks great, left some minor suggestions.

ch01/01_is_unique.go Outdated Show resolved Hide resolved
ch01/03_urlify.go Outdated Show resolved Hide resolved
// This solution doesn't utilize any additional data structures and has O(n) time complexity
func IsUniqueBits(s string) bool {

s = strings.ToLower(s)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can drop it since the bit mask approach will only work for case insensitive ascii strings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually got this idea from a hint related to this question:

Hint #117: Could a bit vector be useful?

ele7ija and others added 2 commits October 13, 2021 17:49
Co-authored-by: eugene kirillov <eug.krlv@gmail.com>
Co-authored-by: eugene kirillov <eug.krlv@gmail.com>
@krlv krlv merged commit a4da997 into krlv:master Oct 21, 2021
@krlv
Copy link
Owner

krlv commented Oct 21, 2021

Thanks @ele7ija !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants