๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.62K subscribers
5.61K photos
3 videos
95 files
10.6K links
๐ŸšฉMain Group - @SuperExams
๐Ÿ“Job Updates - @FresherEarth

๐Ÿ”ฐAuthentic Coding Solutions(with Outputs)
โš ๏ธDaily Job Updates
โš ๏ธHackathon Updates & Solutions

Buy ads: https://telega.io/c/cs_algo
Download Telegram
Dear All,

We have openings for B. Tech / M. Tech and MCA candidates on the following profile at upGrad:

*Position* - Technical Trainer & Mentor

*Skill Set* - JAVA, Data Structures, HTML, CSS & JavaScript,React-JS, MVC, SpringBoot, Rest APIs, JAVA, Data Structures, HTML & CSS, Basics of JavaScript

*Location* - Punjab

*JD* - https://bit.ly/3PYrkvZ

Interested Candidate please contact on details mentioned below or send your resume on supply@upgrad.com

Mr. Shamneesh Sharma - Program Manager - upGrad - +91 86793 34000 - shamneesh.sharma@upgrad.com
Mr. Chetan Sharma - Program Manager - upGrad - +91 7018443448 - chetan2.sharma@upgrad.com
๐Ÿ‘1
// Word Subset
class Solution:
def wordSubsets(self, words1: List[str], words2: List[str]) -> List[str]:
ans = set(words1)
letters = {}
for i in words2:
for j in i:
count = i.count(j)
if j not in letters or count > letters[j]:
letters[j] = count
for i in words1:
for j in letters:
if i.count(j) < letters[j]:
ans.remove(i)
break
return list(ans)

Python 3โœ…
๐Ÿ‘2
vector<int> solve(string s)
{
int l = S.length();
vector<int> lhs(l,0);
vector<int> rhs(l,0);
if(l<1)
return 0;
if(S[0] == '1')
lhs[0] = 1;
if(S[l-1] == '1')
rhs[l-1] = 1;
for(int i=1;i<l;i++)
{
if(S[i] == '1')
lhs[i] = lhs[i-1] + 1;
}
for(int i=l-2;i>=0;i--)
{
if(S[i] == '1')
rhs[i] = rhs[i+1] + 1;
}
int max_ = 0;
for(int i=K-1;i<l;i++)
{
int j = i - (K-1);
int ll = 0,rr = 0;
if(j-1 < 0)
ll = 0;
else
ll = lhs[j-1];
if(i+1>= l)
rr = 0;
else
rr = rhs[i+1];
if(max_ < (ll+rr+K))
max_ = (ll+rr+K);
}
return max_;
}

Vikings solution
๐Ÿ‘1