Half of these clones currently come from my Swift Package “FocusEntity”, which I’m fairly certain Apple will kill off with their own version by the end of the year…
Possibly same with RealityUI, but they won’t be allowed to call it that 😉
comfortably above an average of 80 daily downloads.
If you’re looking for free, open source, Augmented Reality packages for any upcoming apple hardware, I’ve got you covered!
I haven’t seen a problem like this one before, I liked it!
In #AdventOfCode Day 9 you’re crossing a bridge and there’s a rope flailing around, so calculate where the end of the rope will be based on the front of the rope’s movements. #AdventOfSwift
The best solution for day 8 of #AdventOfCode would be a dynamic programming one I think (🤢).
There’s for sure a better choice than what I’ve done, but am trying to avoid a complete brute force/naive solution with this answer:
are all these people completely missing the irony, or am i? i’m sure this ATM is there to highlight out the sick way we value ourselves and each other, in a truly Black Mirror way.
all these people are proving its point.
Day 7 #AdventOfCode in Swift!
Parsing the text in this one was a bit of a pain. Splitting by “$ “ and then by the first new line was a pretty helpful hack though.
Day 6 of #AdventOfCode is a sliding door problem to me.
A pointer at the start and end of the current word, find the largest word with no repeated chars up to the assigned values (4 and 14). Move the start pointer up until no char repeats!
I apologise form my horrendous method of turning the text file into objects in the above solution. Xcode likes to force a newline at the end and trim whitespace chars at the end of lines, so I had to work around that rather than exclusively open the file with another editor…
Day 5 of #AdventOfCode done!
The clue is in the name, use Stacks. There’s no builtin stack class in Swift, so I implemented a basic one there.
For part 2, you can just use a temporary stack to store the items being moved.
#AdventOfCode Day 4 done.
Look at it as just a start and an end, defining conditions that meet if they overlap and contain each other.
I actually made a class for this one rather than a monstrous block of code accessing indices of indices of arrays 😅
#AdventOfCode Day 3 with #Swift done.
I’m using the Set class’s contains and intersection methods, which should give an okay time complexity.
To enhance, use a hash-map giving faster lookup. but i’m not adding that today as it’s the weekend!! 😅
Added Day 2 of #AdventOfCode in Swift!
Finding outcomes of Rock, Paper, Scissors here is done with ascii chars and offsets from each other for both parts, O(n):
Day 1 is complete! Ended up doing a couple of solutions. One with a straightforward approach and the other with a more complex one. Aiming to be more optimised; perfect for technical interviews. (Imperfect for everyday coding.)
SwiftUI has completely changed how we design & develop user interfaces for 2D screens. But next year will be the year of RealityUI, and it's going to shake things up even more.