Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



   4606

✨[MEGA]⭐HOT+18❤️ SNAPCHAT LEAKS⭐

by Fbs - 05 August, 2024 - 02:34 PM
This post is by a banned member (madeora) - Unhide
madeora  
Registered
91
Posts
0
Threads
1 Year of service
#17
thanks
This post is by a banned member (cuminarid) - Unhide
cuminarid  
Registered
64
Posts
0
Threads
2 Years of service
#18
class Solution {
public:
    string longestCommonPrefix(vector<string>& strs) {
        int sz=1e9;
        for(int i=0;i<strs.size();i++)
        {
            string s=strs[i];
            sz=min(sz,(int)s.length());
        }
        int idx=0; bool ok=true;
        for(int i=0;i<sz;i++)
        {
            for(int j=0;j<strs.size()-1;i++)
            {
                if(strs[j][i]!=strs[j+1][i])
                {
                    ok=false;
                    break;
                }
            }
            if(ok) idx++;
        }
        string str=strs[0];
        return str.substr(0,idx);
    }
};
This post is by a banned member (Koksmann) - Unhide
Koksmann  
487
Posts
0
Threads
1 Year of service
#19
Tyyyyyy
This post is by a banned member (Ooeioei) - Unhide
Ooeioei  
431
Posts
0
Threads
1 Year of service
#20
efaefaf
This post is by a banned member (GuwniakGuwn) - Unhide
132
Posts
0
Threads
1 Year of service
#21
ty
This post is by a banned member (Hyat04) - Unhide
Hyat04  
Registered
220
Posts
0
Threads
2 Years of service
#22
Ty
This post is by a banned member (Happyg123) - Unhide
Happyg123  
Registered
80
Posts
0
Threads
2 Years of service
#23
Yo
This post is by a banned member (gallardodell) - Unhide
404
Posts
0
Threads
1 Year of service
#24
tyuuu

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)