Two Strings | Hacker Rank | 25 Marks |

Published: 19 August 2021
on channel: Code With Me
60
4

Question at : https://www.hackerrank.com/challenges...
***************************************************************
IDE: Eclipse
Other Solutions:
Resturant :    • Resturant|Full Solution|30 Marks| Hacker rank  
Balance Brackets :    • Balanced Brackets| 25 marks| https://www.h...  
Array Manipulation :    • Array Manipulation| Hackerrank | 60 Marks ...  
Sparse Arrays :    • Solution for hacker rank Sparse Arrays| Hi...  
___________________________________________________________________________

static String twoStrings(String s1, String s2) //curlyBraces open
int[] tracker = new int[26];
boolean subString = false;
for(int i=0;i lessthan s1.length();i++) //curlyBraces open
tracker[(int)s1.charAt(i)-97]++;
//curlyBraces close
for(int i=0;i less than s2.length();i++) //curlyBraces open
if(tracker[(int)s2.charAt(i)-97] greaterThan 0) //curlyBraces open
subString=true;
break;
//curlyBraces close
//curlyBraces close
return subString?"YES":"NO";

//curlyBraces close


On this page of the site you can watch the video online Two Strings | Hacker Rank | 25 Marks | with a duration of hours minute second in good quality, which was uploaded by the user Code With Me 19 August 2021, share the link with friends and acquaintances, this video has already been watched 60 times on youtube and it was liked by 4 viewers. Enjoy your viewing!