Matrix value of x 3
Alphabet count 9:45
F'(x) 1/1+x^4 A
James Simon 1/20
John peter tom 1/4
Equal no of chocolates 7
Exams 86
Students weights 60.2
G(3) 13
Perfect sq 1/3
P -1
Restaurant tables 10
3.45 bits
it learns based on unlabbled data
only D
b and d
Alphabet count 9:45
F'(x) 1/1+x^4 A
James Simon 1/20
John peter tom 1/4
Equal no of chocolates 7
Exams 86
Students weights 60.2
G(3) 13
Perfect sq 1/3
P -1
Restaurant tables 10
3.45 bits
it learns based on unlabbled data
only D
b and d
t1 t2 relation t1>t2
Trigrams c
Age income student comp 1.0
Ek c1 = (data['Grade'] == 'A') & (data['Marks'] > 60)
c2 = (data['Grade'] == 'B') & (data['Marks'] > 70)
c3 = (data['Grade'] == 'C') & (data['Marks'] > 80)
c = pd.Series(np.select([c1, c2, c3], ['Yes', 'Yes', 'Yes'], default='No'), index=data.index)
data['Admission'] = data['Admission'].fillna(c)
Reinforcement learing scenario all A, B, C, D
Yactual ypredicted iska B
Nouns and parts C
Perceptron model 0
Amazon MLโ
Trigrams c
Age income student comp 1.0
Ek c1 = (data['Grade'] == 'A') & (data['Marks'] > 60)
c2 = (data['Grade'] == 'B') & (data['Marks'] > 70)
c3 = (data['Grade'] == 'C') & (data['Marks'] > 80)
c = pd.Series(np.select([c1, c2, c3], ['Yes', 'Yes', 'Yes'], default='No'), index=data.index)
data['Admission'] = data['Admission'].fillna(c)
Reinforcement learing scenario all A, B, C, D
Yactual ypredicted iska B
Nouns and parts C
Perceptron model 0
Amazon MLโ
int solve(int idx, int n, int countZero, vector<vector<int>>& dp) {
int mod=1e4+7;
if (idx >= n) {
if (countZero >= 2)
return 1;
return 0;
}
if (dp[idx][countZero] != -1)
return dp[idx][countZero];
int count = 0;
for (int i = 0; i <= 9; ++i) {
if (idx == 0 && i == 0)
continue;
if (i == 0)
count = (count + solve(idx + 1, n, countZero + 1, dp)) % mod;
else
count = (count + solve(idx + 1, n, countZero, dp)) % mod;
}
return dp[idx][countZero] = count;
}
int bounty(int input1) {
vector<vector<int>> dp(input1 + 1, vector<int>(input1 + 1, -1));
if (input1 < 2)
return 0;
if (input1 == 2)
return 1;
return solve(0, input1, 0, dp);
}
Bounty
Amazon MLโ
int mod=1e4+7;
if (idx >= n) {
if (countZero >= 2)
return 1;
return 0;
}
if (dp[idx][countZero] != -1)
return dp[idx][countZero];
int count = 0;
for (int i = 0; i <= 9; ++i) {
if (idx == 0 && i == 0)
continue;
if (i == 0)
count = (count + solve(idx + 1, n, countZero + 1, dp)) % mod;
else
count = (count + solve(idx + 1, n, countZero, dp)) % mod;
}
return dp[idx][countZero] = count;
}
int bounty(int input1) {
vector<vector<int>> dp(input1 + 1, vector<int>(input1 + 1, -1));
if (input1 < 2)
return 0;
if (input1 == 2)
return 1;
return solve(0, input1, 0, dp);
}
Bounty
Amazon MLโ
John sam 0.88
8 red balls 0.35
Differential b
Alphabet mean 9.45
2 digit number 12
r nonzero k=1
Mean median mode range A
max diff 162
G(3) =13
AA' x=2
profit margin 0.1667
Red 2nd ball black 1st ball 8/13
Apti Answers
Amazon MLโ
8 red balls 0.35
Differential b
Alphabet mean 9.45
2 digit number 12
r nonzero k=1
Mean median mode range A
max diff 162
G(3) =13
AA' x=2
profit margin 0.1667
Red 2nd ball black 1st ball 8/13
Apti Answers
Amazon MLโ
class Compute:
@classmethod
def compute(cls, input1, input2):
n = input1
arr = input2
result = []
for i in range(n):
m = 0
k = n - 2
left = i - 1
right = i + 1
if i == 0:
for i in range(1, k + 1):
m += abs(arr[0] - arr[i])
result.append(m)
else:
while left >= 0 and right < n:
lside = abs(arr[left] - arr[i])
rside = abs(arr[right] - arr[i])
if lside < rside:
m += lside
left -= 1
k -= 1
if k == 0:
break
else:
m += rside
right += 1
k -= 1
if (k == 0):
break
while left >= 0 and k > 0:
m += abs(arr[left] - arr[i])
left -= 1
k -= 1
while right < n and k > 0:
m += abs(arr[right] - arr[i])
k -= 1
right += 1
result.append(m)
return result
Nearest house โ
@classmethod
def compute(cls, input1, input2):
n = input1
arr = input2
result = []
for i in range(n):
m = 0
k = n - 2
left = i - 1
right = i + 1
if i == 0:
for i in range(1, k + 1):
m += abs(arr[0] - arr[i])
result.append(m)
else:
while left >= 0 and right < n:
lside = abs(arr[left] - arr[i])
rside = abs(arr[right] - arr[i])
if lside < rside:
m += lside
left -= 1
k -= 1
if k == 0:
break
else:
m += rside
right += 1
k -= 1
if (k == 0):
break
while left >= 0 and k > 0:
m += abs(arr[left] - arr[i])
left -= 1
k -= 1
while right < n and k > 0:
m += abs(arr[right] - arr[i])
k -= 1
right += 1
result.append(m)
return result
Nearest house โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
I can't believe how far we've come together on this journey. A big thank you to each and every one of you for supporting me, leaving kind comments, and pushing me to keep creatingโคโ๐ป
def op(players, trainers):
players.sort()
trainers.sort()
count = 0
startT = 0
startP = 0
while startT < len(trainers) and startP < len(players):
if players[startP] >= trainers[startT]:
startP+=1
startT+=1
count+=1
else:
startP+=1
return count
Red Bus โ
players.sort()
trainers.sort()
count = 0
startT = 0
startP = 0
while startT < len(trainers) and startP < len(players):
if players[startP] >= trainers[startT]:
startP+=1
startT+=1
count+=1
else:
startP+=1
return count
Red Bus โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Rupeek is hiring for Android Engineer (2021, 2022 and 2023 grads)
JD: https://docs.google.com/document/u/0/d/1RYlGWEH31KPt5-YZ4G5PSMgrmaMywv-KQpQbPz1mBA4/mobilebasic
Apply Link: https://docs.google.com/forms/d/e/1FAIpQLSfz7XamMLri24X64d-B58m2H70YZl9aItL_o3Hv4N5r-PnVNg/viewform?usp=send_form
JD: https://docs.google.com/document/u/0/d/1RYlGWEH31KPt5-YZ4G5PSMgrmaMywv-KQpQbPz1mBA4/mobilebasic
Apply Link: https://docs.google.com/forms/d/e/1FAIpQLSfz7XamMLri24X64d-B58m2H70YZl9aItL_o3Hv4N5r-PnVNg/viewform?usp=send_form
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
setlmint.com is hiring Full Stack Engineer
For 2024 grads
Check out this job at setlmint.com: https://www.linkedin.com/jobs/view/3957631749
For 2024 grads
Check out this job at setlmint.com: https://www.linkedin.com/jobs/view/3957631749
Linkedin
setlmint.com hiring Full Stack Engineer in Mumbai, Maharashtra, India | LinkedIn
Posted 7:03:34 AM. Full Stack developer role - high growth and high energy environment - FRESHERS ONLYFreshers only***โฆSee this and similar jobs on LinkedIn.
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main()
{
int t;
cin>>t;
while(t--)
{
int m;
cin>>m;
int l;
cin>>l;
int a[l];
for(int i=0;i<l;i++) cin>>a[i];
int r;
cin>>r;
int b[r];
for(int i=0;i<r;i++) cin>>b[i];
int i=0;
int j=0;int price=0;int cnt=0;
while(i<l and j<r and price<=m)
{
if(a[i]>=a[j]) {price+=a[j];cnt++;j++;}
else {price+=a[i];cnt++;i++;}
}
cout<<cnt<<endl;
}
}
Sheldon And Penny โ
public static long[] countSentences(String[] wordSet, String[] sentences) {
long[] counts = new long[sentences.length];
Map<String, Long> wordCountMap = new HashMap<>();
for (String word : wordSet) {
String sortedWord = sortString(word);
wordCountMap.put(sortedWord, wordCountMap.getOrDefault(sortedWord, 0L) + 1);
}
for (int i = 0; i < sentences.length; i++) {
String[] words = sentences[i].split(" ");
long sentenceCount = 1;
for (String word : words) {
String sortedWord = sortString(word);
sentenceCount *= wordCountMap.getOrDefault(sortedWord, 1L);
}
counts[i] = sentenceCount;
}
return counts;
}
private static String sortString(String s) {
char[] charArray = s.toCharArray();
Arrays.sort(charArray);
return new String(charArray);
}
}
How many Sentences โ
BlackRock
long[] counts = new long[sentences.length];
Map<String, Long> wordCountMap = new HashMap<>();
for (String word : wordSet) {
String sortedWord = sortString(word);
wordCountMap.put(sortedWord, wordCountMap.getOrDefault(sortedWord, 0L) + 1);
}
for (int i = 0; i < sentences.length; i++) {
String[] words = sentences[i].split(" ");
long sentenceCount = 1;
for (String word : words) {
String sortedWord = sortString(word);
sentenceCount *= wordCountMap.getOrDefault(sortedWord, 1L);
}
counts[i] = sentenceCount;
}
return counts;
}
private static String sortString(String s) {
char[] charArray = s.toCharArray();
Arrays.sort(charArray);
return new String(charArray);
}
}
How many Sentences โ
BlackRock
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, k;
cin >> n >> m >> k;
vector<vector<int>> arr(n, vector<int>(m));
vector<vector<int>> dist(n, vector<int>(m, INT_MAX));
for (auto &e : arr)
for (auto &ee : e)
cin >> ee;
queue<pair<pair<int, int>, int>> q;
vector<vector<bool>> vis(n, vector<bool>(m, false));
vis[0][0] = true;
dist[0][0] = 0;
q.push({{0, 0}, 0});
while (!q.empty()) {
auto p = q.front();
q.pop();
int x = p.first.first;
int y = p.first.second;
int steps = p.second;
// Right movement
for (int i = 1; i <= k; i++) {
int newY = y + i;
if (newY >= m || arr[x][newY] == 1) break;
if (vis[x][newY]) continue;
q.push({{x, newY}, steps + 1});
vis[x][newY] = true;
dist[x][newY] = steps + 1;
}
// Left movement
for (int i = 1; i <= k; i++) {
int newY = y - i;
if (newY < 0 || arr[x][newY] == 1) break;
if (vis[x][newY]) continue;
q.push({{x, newY}, steps + 1});
vis[x][newY] = true;
dist[x][newY] = steps + 1;
}
// Downward movement
for (int i = 1; i <= k; i++) {
int newX = x + i;
if (newX >= n || arr[newX][y] == 1) break;
if (vis[newX][y]) continue;
q.push({{newX, y}, steps + 1});
vis[newX][y] = true;
dist[newX][y] = steps + 1;
}
// Upward movement
for (int i = 1; i <= k; i++) {
int newX = x - i;
if (newX < 0 || arr[newX][y] == 1) break;
if (vis[newX][y]) continue;
q.push({{newX, y}, steps + 1});
vis[newX][y] = true;
dist[newX][y] = steps + 1;
}
}
cout << (dist[n - 1][m - 1] == INT_MAX ? -1 : dist[n - 1][m - 1]) << endl;
}
Minimum moves โ
using namespace std;
int main() {
int n, m, k;
cin >> n >> m >> k;
vector<vector<int>> arr(n, vector<int>(m));
vector<vector<int>> dist(n, vector<int>(m, INT_MAX));
for (auto &e : arr)
for (auto &ee : e)
cin >> ee;
queue<pair<pair<int, int>, int>> q;
vector<vector<bool>> vis(n, vector<bool>(m, false));
vis[0][0] = true;
dist[0][0] = 0;
q.push({{0, 0}, 0});
while (!q.empty()) {
auto p = q.front();
q.pop();
int x = p.first.first;
int y = p.first.second;
int steps = p.second;
// Right movement
for (int i = 1; i <= k; i++) {
int newY = y + i;
if (newY >= m || arr[x][newY] == 1) break;
if (vis[x][newY]) continue;
q.push({{x, newY}, steps + 1});
vis[x][newY] = true;
dist[x][newY] = steps + 1;
}
// Left movement
for (int i = 1; i <= k; i++) {
int newY = y - i;
if (newY < 0 || arr[x][newY] == 1) break;
if (vis[x][newY]) continue;
q.push({{x, newY}, steps + 1});
vis[x][newY] = true;
dist[x][newY] = steps + 1;
}
// Downward movement
for (int i = 1; i <= k; i++) {
int newX = x + i;
if (newX >= n || arr[newX][y] == 1) break;
if (vis[newX][y]) continue;
q.push({{newX, y}, steps + 1});
vis[newX][y] = true;
dist[newX][y] = steps + 1;
}
// Upward movement
for (int i = 1; i <= k; i++) {
int newX = x - i;
if (newX < 0 || arr[newX][y] == 1) break;
if (vis[newX][y]) continue;
q.push({{newX, y}, steps + 1});
vis[newX][y] = true;
dist[newX][y] = steps + 1;
}
}
cout << (dist[n - 1][m - 1] == INT_MAX ? -1 : dist[n - 1][m - 1]) << endl;
}
Minimum moves โ
Tomorrow will be upload Cisco Codes those Who will be give Exam
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
International opportunity alert ๐
Cobblestone Energy is hiring Software Engineer
For 2024, 2023 grads
Location - Dubai
Apply - https://grnh.se/c8535a2c3us
Cobblestone Energy is hiring Software Engineer
For 2024, 2023 grads
Location - Dubai
Apply - https://grnh.se/c8535a2c3us
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Process Associates (P2P Process) at KGiS
Requirements:
Experience: Fresher
Position: Process Associates
Technical Skills: Core Accounting concepts, Bank and ledger reconciliation.
Shift: Rotational Shifts.
Location: Coimbatore
Notice period: Immediate
Interested candidates can come for a direct walk-in drive.
The Walk-in drive is scheduled as per the below details:
Date: (25-June and 27-June-2024)
Time: 10:00 AM to 01:00 PM
Address:
Opposite to holiday residency
KGISL campus
365, IT Tower 1,
Thudiyalur Road,
Saravanampatti,
Coimbatore - 641035.
Kindly come directly to the office with documents and a resume.
Your point of contact:
Name: Priyanka S
Contact: +91 8754193339
Requirements:
Experience: Fresher
Position: Process Associates
Technical Skills: Core Accounting concepts, Bank and ledger reconciliation.
Shift: Rotational Shifts.
Location: Coimbatore
Notice period: Immediate
Interested candidates can come for a direct walk-in drive.
The Walk-in drive is scheduled as per the below details:
Date: (25-June and 27-June-2024)
Time: 10:00 AM to 01:00 PM
Address:
Opposite to holiday residency
KGISL campus
365, IT Tower 1,
Thudiyalur Road,
Saravanampatti,
Coimbatore - 641035.
Kindly come directly to the office with documents and a resume.
Your point of contact:
Name: Priyanka S
Contact: +91 8754193339