Hello,
LeetCode is a good place to practice programming by solving problems of all levels!
After you solve a problem, you’ll get access to all submitted solutions, sorted by time and memory usage. That’s a nice way to compare your code to others and see what you did well and where you can improve.
Here’s my solutions for the Arrays 101: Introduction card:
Max Consecutive Ones
|
|
Find Numbers with Even Number of Digits
|
|
Squares of a Sorted Array
When writing code like this be careful because you’re altering the A list in place.
|
|
Thanks for reading!
If you like what I’m writing, don’t forget to subscribe! 🙂
[jetpack_subscription_form show_subscribers_total=”false” button_on_newline=”true” custom_font_size=”16px” custom_border_radius=”0″ custom_border_weight=”1″ custom_padding=”15″ custom_spacing=”10″ submit_button_classes=”has-text-color has-background-color has-background has-primary-background-color” email_field_classes=”” show_only_email_and_button=”true”]