RISHI SHARMA’s Post

View profile for RISHI SHARMA, graphic

WEB DEVLOPER | MERN STACK DEVLOPER | REACT JS | HTML | CSS | JAVASCRIPT | NODE.JS | EXPRESS.JS | MONGO DB | TAILWIND CSS | JAVA PROGRAMMER |

🌟 Day 76 of my 100-day coding challenge: Today, I solved LeetCode Problem 14: "Longest Common Prefix." My Approach: To find the longest common prefix, I used a helper function MaxPrefix that compares two strings and returns the longest common prefix between them. Starting with the first string in the array, I iterated through all other strings, updating the common prefix as I went. The process stops as soon as there's a mismatch between characters. This problem was a great exercise in string comparison and efficient handling of multiple inputs! #100DayCodingChallenge #LeetCodeProblemSolving #Day76 #LongestCommonPrefix

  • No alternative text description for this image
Amitesh Awasthi

PYTHON DEVELOPER || DATA-ANALYST || BUSINESS-ANALYST || INSIGHT-DASHBOARD DEVELOPER || POWER-BI DEVELOPER || DATA SCIENCE & ML

3mo

keep going

Like
Reply

To view or add a comment, sign in

Explore topics