It's 1st December already, which means it's "Advent Of Code" time again (https://lnkd.in/ebrUApNx). I've been taking part since 2021, and whilst I've had greater success some years than others, I've always really enjoyed doing it. Sometimes, day-to-day coding at work can end up being a bit of a repeat of using the existing components to do something or just modifying existing code to add some functionality. It's good to have the opportunity to start with a blank sheet of paper (or an empty file in an IDE) and try to solve a completely new puzzle from scratch. The puzzles are also sized quite nicely, so it's not too arduous if, after solving the puzzle the first time around, you want to go back and try again. It can also be a good way to learn a new language. In 2022, it coincided with me having just been made redundant - as well as being a great distraction from that, some of the jobs I was interviewing for may have needed Python, so I was solving the puzzle first in Typescript/node, then trying to write the same solution in Python. Anyway, I'm a big fan and I definitely recommend giving it a go!
Paul Hadfield’s Post
More Relevant Posts
-
Hi everyone, I’m excited to announce the release of my new Python package, aoc-input-fetcher. For the past decade, Eric Wastl has been hosting a fun coding challenge called Advent of Code (https://adventofcode.com/) every December. While I have only ever made it past a handful of days, I’ve always enjoyed participating and learning. One of my recurring annoyance was manually copying and pasting input data into text files. To streamline this, I developed aoc-input-fetcher. It automates the retrieval of input data directly from the Advent of Code website, saving you time and effort. You don’t even need to specify the URL (as long as you follow the directory structure and file naming scheme 😅 ). If you’re an Advent of Code participant, I encourage you to check out my package. It’s a simple tool that can make your coding journey smoother. If you haven’t tried Advent of Code but have some programming experience, I’d suggest giving it a shot (and using my package!) Please let me know if you encounter any issues or have suggestions for improvement. I’m aware of a few limitations, such as the automatic generation of input.txt files in a relative directory. While this doesn’t affect my workflow, I’ll address it if it becomes a common issue. In any case, I hope you find this package useful! It’s been exciting to release my own Python package. Please consider: - Downloading and trying aoc-input-fetcher (https://lnkd.in/g-UV-Y5k) - Starring the project on GitHub to show your support - Connect with me on LinkedIn to chat about all things development! #python #adventofcode #opensource #webscraping #automation
To view or add a comment, sign in
-
It's December, and that means it's time for Advent of Code (https://lnkd.in/g8kabwMf)! I've been doing this since 2021 when I started learning Python. I am very much not anyone who would get paid to write code, but I've been making my way as far as I can each year. My 2024 repo is at https://lnkd.in/gvgCDPGP, if you're participating, comment below with your language of choice and a link to your repo so I can follow along with others and learn. #adventofcode
To view or add a comment, sign in
-
Anyone else participating in Advent of Code? I'm going through to brush up on some Python syntax. Would love to have some partners in it, other than my good friend Claude -- don't worry only using it for hints on what data structures to use and then feedback on how to make the code more Pythonic. We can be language agnostic. I actually tried to solve day 1 part A only using excel, and it worked. Shoot me a note, if we get a few up us I can set up a slack channel or something. https://adventofcode.com/
To view or add a comment, sign in
-
Anyone else doing Advent of Code? (https://adventofcode.com/) It's been so fun to do each year. Sometimes I try a new programming language like Rust or Python, but this year I'm going back to using vanilla JS in Firefox's multi-line editor. You can navigate to the puzzle input and open dev tools and paste this in to get started! (function() { const content = document.getElementsByTagName('pre')[0].innerText.split('\n'); console.log(content); })();
To view or add a comment, sign in
-
🚀 Day 50 of #100DaysOfCode 🚀 Problem: Redistribute character to make all strings equal. Definition: You are given an array of strings words (0-indexed). In one operation, pick two distinct indices i and j, where words[i] is a non-empty string, and move any character from words[i] to any position in words[j]. Return true if you can make every string in words equal using any number of operations, and false otherwise. Checkout - Github: https://lnkd.in/gKFHiiZa Leetcode: https://lnkd.in/g-hbEeXp #CodingJourney #LeetCode #TechSkills #ContinuousLearning #DSAwithedSlash edSlash LeetCode
To view or add a comment, sign in
-
-
🔢 Day 6 of #100DaysOfCode 🚀 Challenge: Two Sum 💻 Platform: LeetCode 🌟 Problem Statement: Given an array of integers and a target value, find two numbers that add up to the target and return their indices. You can’t use the same element twice, and there’s always one valid solution. 💡 Approach: 1️⃣ Iterate through the array using nested loops. 2️⃣ For each element, check if the sum with another element equals the target. 3️⃣ If the sum matches, store their indices in the result array. 4️⃣ Return the indices once the pair is found. ✨ Example: 🟢 Input: nums = [2, 7, 11, 15], target = 9 🟢 Output: [0, 1] 🔎 Explanation: Because nums[0] + nums[1] = 9. 🎯 Takeaway: ✅ Learned how to solve array-based problems using brute-force logic. 🔎 Though this solution works, it’s not the most efficient. A better approach would be to use a hashmap to reduce time complexity to O(n). 📌 GitHub Repository: https://lnkd.in/geAViUEE 🔗 LeetCode Challenges #DSAwithedSlash @edslash and @leetcode. #Day6 #TwoSum #LeetCode #DSAwithedSlash #CodingChallenge 💻🚀
To view or add a comment, sign in
-
-
Advent of Code 2024 https://adventofcode.com/ is almost here! Is anyone else excited? I am! It's a fun way to practice those programming skills! I'll be doing mine in plain JavaScript in my CodePen and maybe I'll build out a full app in React later to add to my portfolio. But in the very least, I just wanna be able to finish out the whole calendar. How about you? #adventofcode #javascript #programming
To view or add a comment, sign in
-
🌟 Day 7 of the LeetCode 90-Day Challenge! 🌟 Today's problem was all about financial strategy: "Best Time to Buy and Sell Stock." A great exercise in optimizing decisions for maximum profit! 📈 Problem Statement: Given an array prices where prices[i] represents the price of a stock on the i-th day, find the maximum profit you can achieve by making one buy and one sell transaction. My Approach: ->Initiated a variable bb (Best Buy) to track the minimum price encountered so far. ->Iterated through the array and checked potential profit for each day by subtracting bb from the current price. ->Updated the maximum profit mp whenever a higher profit was observed. Time Complexity: O(n): The algorithm traverses the array once, making it linear in terms of time complexity. Space Complexity: O(1), as only a few variables are used to store intermediate values, making it efficient in terms of space. 💡 Takeaway: This problem was a practical reminder of how efficient algorithms can solve real-world challenges. Tracking the minimum price and calculating profit on the go reduces complexity while ensuring optimal results. Excited to continue this journey and tackle Day 8 tomorrow! 🚀 #LeetCode #CodingChallenge #90DaysOfCode #ProblemSolving #Java #AlgorithmOptimization
To view or add a comment, sign in
-
-
🌟 Day 88 of my 120-Day Code Challenge! 🚀 Today, I tackled two intriguing problems: - *LeetCode POTD:* Binary Search Tree to Greater Sum Tree 🌳 - This problem involved transforming a BST into a Greater Sum Tree where each node contains the sum of all nodes greater than itself. It was a great exercise in recursion and understanding tree traversal techniques. - *GFG POTD:* Left Rotate Matrix K Times 🔄 - This task required rotating a matrix to the left K times. It was a fun challenge that tested my skills in matrix manipulation and algorithm optimization. Both problems were challenging and fun, helping me to further enhance my skills in tree manipulation and matrix operations. Each day of this journey brings new opportunities to learn and grow, and I’m excited to keep pushing forward. #120DaysOfCode #LeetCode #GeeksforGeeks #Day88 #CodingJourney #CodeChallenge #KeepLearning #ProblemSolving
To view or add a comment, sign in
-
-
Programming in Haskell feels like walking around a dark room full of open cabinet doors set at forehead level. Context: Today begins Advent of Code 2024. Because I am taking a functional programming course next year and because I like pain, I am using Haskell.
To view or add a comment, sign in