Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
0 Endorsements
~264 People Reached
Favorite Forums
Favorite Tags
Member Avatar for neha_8

I wrote this code to find if string s2 is a substring of string s1. However I'm getting time limit exceeded. How can I make my algorithm better? #include<stdio.h> int main() { char s1[20], s2[20]; scanf("%s %s", s1,s2); char *p, *q, *count; p=s1; q=s2; int i=21; do{ if(*p==*q) /* the …

Member Avatar for neha_8
0
188
Member Avatar for neha_8

hello everyone, I'm neha, a programming beginner and enthusiast, from India. I'm looking forward to learn a lot from all of you and hopefully will be able to make meaningful contributions too. Thanks all!

Member Avatar for thunderstorm98
-1
76