LTLyn Teeincoderlyn.hashnode.dev·Nov 15, 2025 · 1 min readleetcode: merge strings alternatelyhttps://leetcode.com/problems/merge-strings-alternately/editorial/?source=submission-ac In swift, you cannot access characters by someString[3] It’s a big song and dance with getting a string index from the startIndex Once you have the start index,...00
LTLyn Teeincoderlyn.hashnode.dev·Nov 8, 2025 · 2 min readleetcode: 2 sum - think about DICTIONARIESThings I learnt: When there is mapping to be done, think about a DICTIONARY Here, we have to use the VALUES of the array, e.g. [1, 2, 3, 4] Figure out which numbers add up to 6 = 2 + 4 But we want to output the INDEX of the array So we need to m...00
LTLyn Teeincoderlyn.hashnode.dev·Aug 6, 2025 · 2 min read@MainActor attribute - when to applyIf you are in the middle of having Swift five and six in your code base, then you will need to proactively deal with applying the main actor attribute to your Swift five code, so that it doesn't break when you upgrade to Swift six. This can happen if...00
LTLyn Teeincoderlyn.hashnode.dev·Feb 19, 2025 · 4 min readSystem design: design a parking garage, WIPDesign a reservation and payment system for a parking garage https://www.youtube.com/watch?v=NtMvNh0WFVM&list=PLrtCHHeadkHp92TyPt1Fj452_VGLipJnL I’m up to 4m01s Step 1: define the scope Clarifying questions I came up with <what do I call this catego...00
LTLyn Teeincoderlyn.hashnode.dev·Feb 4, 2025 · 1 min readSystem designThoughts on what to discuss at each stage Step 1: narrow the scope Scale: how many users / traffic Security / Authentication: is this already in place? Data size: e.g. handling videos is different to images vs small data like credit card transacti...00