Hello friends!
I hope you Americans had a good long weekend, and the rest of y'all had a great week overall! I got to hang out with family and friends, and it was so nice. Let's boogie.
Was this forwarded to you? You can subscribe here!
Working with Pasted Content in JavaScript
Your bad LCP score might be a backend issue
How to Annul Promises in JavaScript
Tech Conference Talks: My Preparation Strategy
This week was a catch-up week for me after a long string of conferences! I recorded a podcast, took some calls, and also blogged about the productivity apps I use and how you should approach job applications.
In unrelated activities, I finished the book Two Nights in Lisbon (which I bought in Lisbon last Fall)! It was good, I rated it 3 out of 5 stars because I liked the story and its twists, but I wasn't a huge fan of the writing style. It was entertaining though!
In lieu of a sponsor, I would absolutely love if you could tell me a bit more about yourself!
Please fill out this form when you get a chance, if you have time. I have been asking new subscribers questions about themselves in their confirmation emails, and it's been a genuine pleasure getting to know them. So, naturally, I'd like to get to know everyone here as well! Especially you.
Last week, I had you make a fruit stand! Awesome job Nicolas, Chase, Gu, Ricardo, Charles, Amine, Josh, Miguel, Ten, Ross, Muhammad, Theresa, Angelo, John, Krisztina, and Mazen!
This week's question:
Write a function that takes an array of integers representing the number of flowers planted in a line, and an integer k
representing the number of additional flowers you want to plant. Return whether it's possible to plant all k
flowers without planting any two flowers adjacent to each other.
Example:
> canPlantFlowers([1, 0, 0, 0, 1], 1)
> true // you can plant 1 flower between the others
> canPlantFlowers([1, 0, 0, 0, 1], 2)
> false
> canPlantFlowers([0, 0, 0, 0, 0], 3)
> true
> canPlantFlowers([1, 0, 1, 0, 1], 1)
> false
(you can submit your answers by replying to this email with a link to your solution, or share on LinkedIn, Twitter, Mastodon, or Bluesky)
Class 60 with EC Kit
Will We Ever Get Fusion Power?
How to run a small social network site for your friends
The Logistics of German Reunification
What creature is smarter than a talking parrot?
A spelling bee.
That's all for now, folks! Have a great week. Be safe, make good choices, and stretch your back!
Special thanks to IceSloth, Ezell, Sebastián, Ben, Kinetic Labs, and Faisal for supporting my Patreon and this newsletter!
cassidoo
website | blog | github | twitter | patreon | twitch | codepen | mastodon | bluesky