Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
PropertyGuru Group is hiring SDE
For 2024 grads
https://assessment.hackerearth.com/challenges/new/hiring/property-guru-hackathon/
For 2024 grads
https://assessment.hackerearth.com/challenges/new/hiring/property-guru-hackathon/
HackerEarth
Prodi-G Grad Programme Hackathon Challenge
Join PropertyGuru's Exciting Graduate Programme
Are you ready to kickstart your career in technology with a company at the forefront of innovation? PropertyGuru Group-Southeast Asiaโs leading PropTech company invites you to be part of our Prodi-G Graduateโฆ
Are you ready to kickstart your career in technology with a company at the forefront of innovation? PropertyGuru Group-Southeast Asiaโs leading PropTech company invites you to be part of our Prodi-G Graduateโฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company name:Clootrack
Location:Remote
Job ole:Data Analyst-Intern
Link:https://clootrack.freshteam.com/jobs/Yx9Wd8Zso5vS/data-analyst-intern-remote
Location:Remote
Job ole:Data Analyst-Intern
Link:https://clootrack.freshteam.com/jobs/Yx9Wd8Zso5vS/data-analyst-intern-remote
Freshteam
Hiring for Data Analyst - Intern (Remote) - Internship
Posted by : Clootrack Software Labs Private Limited |
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Photon hiring Frontend Developer
2024/2023/2022 passouts eligible
https://fa-ertb-saasfaprod1.fa.ocs.oraclecloud.com/hcmUI/CandidateExperience/en/sites/CX_2/job/20031/
2024/2023/2022 passouts eligible
https://fa-ertb-saasfaprod1.fa.ocs.oraclecloud.com/hcmUI/CandidateExperience/en/sites/CX_2/job/20031/
Photon Career Site
Front End Developers - Bangalore, India
Key Responsibilities: - Develop and maintain user-facing features using React. - Collaborate with designers to translate UI/UX design wireframes into high-quality code. - Optimize components for maximum performance across a vast array of web-capable devicesโฆ
const int MOD = 1'000'000'007;
int countBalancedWords(int n, int d) {
vector<vector<int>> dp(n + 1, vector<int>(26, 0));
for (int j = 0; j < 26; ++j) {
dp[1][j] = 1;
}
for (int i = 2; i <= n; ++i) {
for (int j = 0; j < 26; ++j) {
for (int k = 0; k < 26; ++k) {
if (abs(j - k) <= d) {
dp[i][j] = (dp[i][j] + dp[i - 1][k]) % MOD;
}
}
}
}
int result = 0;
for (int j = 0; j < 26; ++j) {
result = (result + dp[n][j]) % MOD;
}
return result;
}
int countBalancedWords(int n, int d) {
vector<vector<int>> dp(n + 1, vector<int>(26, 0));
for (int j = 0; j < 26; ++j) {
dp[1][j] = 1;
}
for (int i = 2; i <= n; ++i) {
for (int j = 0; j < 26; ++j) {
for (int k = 0; k < 26; ++k) {
if (abs(j - k) <= d) {
dp[i][j] = (dp[i][j] + dp[i - 1][k]) % MOD;
}
}
}
}
int result = 0;
for (int j = 0; j < 26; ++j) {
result = (result + dp[n][j]) % MOD;
}
return result;
}
๐1
def min_swaps(s, k):
k_count = s.count(k)
if k_count <= 1:
return 0
window_size = k_count
non_k_count = 0
for i in range(window_size):
if s[i] != k:
non_k_count += 1
min_swaps = non_k_count
for i in range(window_size, len(s)):
if s[i - window_size] != k:
non_k_count -= 1
if s[i] != k:
non_k_count += 1
min_swaps = min(min_swaps, non_k_count)
return min_swaps
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Internship opportunity for AI engineers in Hyderabad | Anudeep Nekkanti posted on the topic | LinkedIn
~~ Flagship Intern Opportunity (One of the best in India) ~~
Role: AI Engineer Intern
Stipend: 1.5 Lakh/month
Perks:
- 8 x PVR/INOX movie tickets
- Breakfast,โฆ | 112 comments on LinkedIn
Role: AI Engineer Intern
Stipend: 1.5 Lakh/month
Perks:
- 8 x PVR/INOX movie tickets
- Breakfast,โฆ | 112 comments on LinkedIn
def max_errors_in_window(N, error_counts, K):
if K > N:
return max(error_counts)
window_sum = sum(error_counts[:K])
max_errors = window_sum
for i in range(K, N):
window_sum = window_sum - error_counts[i-K] + error_counts[i]
max_errors = max(max_errors, window_sum)
return max_errors
N = int(input())
error_counts = [int(input()) for _ in range(N)]
K = int(input())
result = max_errors_in_window(N, error_counts, K)
print(result)
def find_index_pairs(arr, k):
n = len(arr)
result = [0] * n
value_dict = {}
for i, value in enumerate(arr):
if value in value_dict:
if abs(i - value_dict[value]) == k:
result[i] = 1
result[value_dict[value]] = 1
value_dict[value] = i
target_plus = value + k
target_minus = value - k
if target_plus in value_dict and abs(i - value_dict[target_plus]) == k:
result[i] = 1
result[value_dict[target_plus]] = 1
if target_minus in value_dict and abs(i - value_dict[target_minus]) == k:
result[i] = 1
result[value_dict[target_minus]] = 1
return result
N = int(input())
arr = [int(input()) for _ in range(N)]
K = int(input())
output = find_index_pairs(arr, K)
for val in output:
print(val)
#include <iostream>
#include <string>
#include <deque>
using namespace std;
int main() {
string chocolates, choices;
cin >> chocolates;
cin >> choices;
deque<char> stack(chocolates.begin(), chocolates.end());
int redCount = 0;
for (char choice : choices) {
if (choice == 'F') {
if (stack.front() == 'R') {
redCount++;
}
stack.pop_front();
} else if (choice == 'L') {
if (stack.back() == 'R') {
redCount++;
}
stack.pop_back();
}
}
cout << redCount << endl;
return 0;
}
๐2
class Solution {
public:
int candy(vector<int>& ratings) {
int N=ratings.size(), prev=1;
vector<int> cnt(N, 0);
cnt[0] = 1;
for(int i=1;i<N;i++){
if(ratings[i]> ratings[i-1]){
cnt[i] = cnt[i-1]+1;
}
else{
cnt[i]=1;
}
}
for(int i=N-2; i >=0; i--){
if(ratings[i]>ratings[i+1]){
cnt[i] =max(cnt[i], cnt[i+1]+1);
}
}
int sum=accumulate(cnt.begin(), cnt.end(), 0);
return sum;
}
};
Candy Distribution โ
public:
int candy(vector<int>& ratings) {
int N=ratings.size(), prev=1;
vector<int> cnt(N, 0);
cnt[0] = 1;
for(int i=1;i<N;i++){
if(ratings[i]> ratings[i-1]){
cnt[i] = cnt[i-1]+1;
}
else{
cnt[i]=1;
}
}
for(int i=N-2; i >=0; i--){
if(ratings[i]>ratings[i+1]){
cnt[i] =max(cnt[i], cnt[i+1]+1);
}
}
int sum=accumulate(cnt.begin(), cnt.end(), 0);
return sum;
}
};
Candy Distribution โ
โค1
#include <iostream>
#include <vector>
using namespace std;
using ll = long long;
int solve(int x, int n, vector<int>& a) {
ll ans = 0;
for (int num : a) {
ans += num;
}
if (ans % x != 0) {
return n;
}
ll left = 0, right = n - 1;
while (left < n && a[left] % x == 0) {
left++;
}
while (right >= 0 && a[right] % x == 0) {
right--;
}
ll mm = max(n - left - 1, right);
return mm > 0 ? mm : -1;
}
Crazy Subarray โ
๐1
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
int[] arr = new int[N];
for (int i = 0; i < N; i++) {
arr[i] = scanner.nextInt();
}
int result = findLeftmostIndex(N, arr);
System.out.println(result);
scanner.close();
}
public static int findLeftmostIndex(int N, int[] arr) {
int totalSum = 0;
for (int value : arr) {
totalSum += value;
}
int leftSum = 0;
for (int i = 0; i < N; i++) {
totalSum -= arr[i];
if (leftSum == totalSum) {
return i;
}
leftSum += arr[i];
}
return -1;
}
}
Mid Support โ
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
int[] arr = new int[N];
for (int i = 0; i < N; i++) {
arr[i] = scanner.nextInt();
}
int result = findLeftmostIndex(N, arr);
System.out.println(result);
scanner.close();
}
public static int findLeftmostIndex(int N, int[] arr) {
int totalSum = 0;
for (int value : arr) {
totalSum += value;
}
int leftSum = 0;
for (int i = 0; i < N; i++) {
totalSum -= arr[i];
if (leftSum == totalSum) {
return i;
}
leftSum += arr[i];
}
return -1;
}
}
Mid Support โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll N=1e5+10;
ll vis[N]={0},a[26]={0};
char col[N];
vector<ll>adj[N];
ll ans=0;
void dfs(ll node)
{
if(a[col[node]-'a']==0) ans++;
a[col[node]-'a']++;
vis[node]=1;
for (ll it:adj[node])
{
if(!vis[it])
dfs(it);
}
a[col[node]-'a']--;
}
signed main()
{
ll t; cin>>t;
while(t--)
{
ll n; cin>>n;
for(ll i=1;i<=n;i++)
{
adj[i].clear();
vis[i]=0;
}
for(auto&it:a) it=0;
for(ll i=1;i<=n;i++) cin>>col[i];
for(ll i=0;i<n-1;i++)
{
ll u,v; cin>>u>>v;
adj[u].push_back(v);
adj[v].push_back(u);
}
ans=0;
dfs(1);
cout<<ans<<endl;
}
}
Parent node โ
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll N=1e5+10;
class dsu
{
public:
vector<ll> parent,size;
dsu(ll n) {
parent.resize(n + 1);
size.resize(n + 1,1);
for (ll i = 0; i <= n; i++) parent[i] = i;
}
ll par(ll node) {
if (node == parent[node])
return node;
return parent[node]=par(parent[node]);
}
void usize(ll u,ll v) {
ll ulp_u=par(u);
ll ulp_v=par(v);
if (ulp_u == ulp_v) return;
if (size[ulp_u] < size[ulp_v]) {
parent[ulp_u] = ulp_v;
size[ulp_v] += size[ulp_u];
}
else {
parent[ulp_v] = ulp_u;
size[ulp_u] += size[ulp_v];
}
}
};
bool prime[N];
void pre()
{
memset(prime,true,sizeof(prime));
prime[1]=0;
for(ll i=2;i*i<=N;i++)
{
if(prime[i]==1)
{
for(ll j=i*i;j<=N;j+=i)
prime[j]=0;
}
}
}
signed main()
{
pre();
ll n; cin>>n;
dsu obj(n+1);
vector<vector<ll>>g(n+1);
for(ll i=1;i<n;i++)
{
ll a,b; cin>>a>>b;
if(prime[a]==1 && prime[b]==1) continue;
else if(prime[a]==1) g[a].push_back(b);
else if(prime[b]==1) g[b].push_back(a);
else obj.usize(a,b);
}
ll ans=0;
for(ll i=1;i<=n;i++)
{
if(prime[i])
{
ll curr=1;
for(auto rel:g[i]) curr+=obj.size[obj.par(rel)];
for(auto rel:g[i])
{
ll ex=obj.size[obj.par(rel)];
ans+=ex*(curr-ex);
curr-=ex;
}
}
}
cout<<ans<<endl;
}
Prime Tree โ
SELECT order_id, product_id, buyer
FROM quantity
WHERE quantity_ordered = ANY (SELECT 6)
ORDER BY buyer ASC;
Zepto (SQL) โ
#include <bits/stdc++.h>
using namespace std;
#define ll long long
ll solve(vector<ll>&a)
{
ll n=a.size();
ll ans=0;
unordered_map<ll,ll>mpp;
for(auto it:a) mpp[it]++;
ll i=3;
vector<ll>t;
while(i<=pow(3,21))
{
t.push_back(i);
i*=3;
}
for(ll i=0;i<n;i++)
{
for(auto it:t)
{
if(it>=a[i] && mpp.find(it-a[i])!=mpp.end()) ans+=mpp[a[i]]*mpp[it-a[i]];
}
mpp.erase(a[i]);
}
return ans;
}
signed main()
{
ll n; cin>>n;
vector<ll>a(n);
for(ll i=0;i<n;i++) cin>>a[i];
cout<<solve(a)<<endl;
}
Valid Pairs โ