Day 75 of 100 Days of DSA: Excel Sheet Column Number

⚡ 𝗗𝗮𝘆 𝟳𝟱 𝗼𝗳 𝗠𝘆 𝟭𝟬𝟬 𝗗𝗮𝘆𝘀 𝗼𝗳 𝗗𝗦𝗔 𝗖𝗵𝗮𝗹𝗹𝗲𝗻𝗴𝗲! 𝘛𝘰𝘥𝘢𝘺’𝘴 𝘱𝘳𝘰𝘣𝘭𝘦𝘮 𝘸𝘢𝘴 𝘢 𝘨𝘳𝘦𝘢𝘵 𝘮𝘪𝘹 𝘰𝘧 𝙨𝙩𝙧𝙞𝙣𝙜 𝙥𝙧𝙤𝙘𝙚𝙨𝙨𝙞𝙣𝙜 𝙖𝙣𝙙 𝙢𝙖𝙩𝙝𝙚𝙢𝙖𝙩𝙞𝙘𝙖𝙡 𝙩𝙝𝙞𝙣𝙠𝙞𝙣𝙜, 𝘪𝘯𝘴𝘱𝘪𝘳𝘦𝘥 𝘣𝘺 𝘢 𝘳𝘦𝘢𝘭-𝘸𝘰𝘳𝘭𝘥 𝘴𝘺𝘴𝘵𝘦𝘮 𝘸𝘦 𝘢𝘭𝘭 𝘳𝘦𝘤𝘰𝘨𝘯𝘪𝘻𝘦 𝘌𝘹𝘤𝘦𝘭 𝘤𝘰𝘭𝘶𝘮𝘯𝘴. 📌 Problem Solved: 1️⃣ 𝗟𝗲𝗲𝘁𝗰𝗼𝗱𝗲 171: Excel Sheet Column Number ✨ Key Learnings: 🔹 This problem is essentially about 𝗯𝗮𝘀𝗲-𝟮𝟲 𝗻𝘂𝗺𝗯𝗲𝗿 𝗰𝗼𝗻𝘃𝗲𝗿𝘀𝗶𝗼𝗻, where characters act as digits instead of numbers. 🔹 Iterating through the string and updating the result as result = result * 26 + currentCharValue helps build the column number efficiently. 🔹 It reinforced how 𝗰𝗵𝗮𝗿𝗮𝗰𝘁𝗲𝗿-𝘁𝗼-𝗻𝘂𝗺𝗯𝗲𝗿 𝗺𝗮𝗽𝗽𝗶𝗻𝗴 ('A' → 1 to 'Z' → 26) plays a crucial role in many string-based problems. 🧠 Big Takeaway: Problems that look string-heavy often boil down to 𝘀𝗶𝗺𝗽𝗹𝗲 𝗺𝗮𝘁𝗵 + 𝗶𝘁𝗲𝗿𝗮𝘁𝗶𝗼𝗻 once the pattern is clear. Day 75 completed — slowly but surely stacking fundamentals! 💪🔥 #100DaysOfCode #DSA #Java #Strings #ProblemSolving #LogicBuilding #InterviewPreparation #LeetCode #LearningInPublic #Developers

  • graphical user interface, text, application

To view or add a comment, sign in

Explore content categories