Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Interactive Brokers is hiring for Junior Software Engineer- Freshers (2024)
Experience: 0 - 1 year's
Expected Salary: 9 - 15 LPA
Apply here:
https://boards.greenhouse.io/ibkr/jobs/7524334002?gh_src=19375022
Experience: 0 - 1 year's
Expected Salary: 9 - 15 LPA
Apply here:
https://boards.greenhouse.io/ibkr/jobs/7524334002?gh_src=19375022
job-boards.greenhouse.io
Interactive Brokers
<p><span data-preserver-spaces="true">Interactive Brokers Group, Inc. (NASDAQ: "IBKR"); is a direct access electronic broker catering to the needs of professional and frequent traders, institutional investors, financial advisers, and introducing brokers.โฆ
๐2
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Infoane is hiring for Software Engineer
Walkin Drive on 20 July 2024
Batch : 2024/2023 passouts eligible
Apply Here :
https://docs.google.com/forms/d/e/1FAIpQLSf7pqYTBC-SnKR5wvJysHYyLlfEXX35KuE9wcn35k554_JEgQ/viewform?pli=1
Walkin Drive on 20 July 2024
Batch : 2024/2023 passouts eligible
Apply Here :
https://docs.google.com/forms/d/e/1FAIpQLSf7pqYTBC-SnKR5wvJysHYyLlfEXX35KuE9wcn35k554_JEgQ/viewform?pli=1
Google Docs
Infoane Technologies - Trainee Software Engineer - July 20, 2024
Position: Trainee Software Engineer (Freshers)
Work location: Kovilpatti, Tamil Nadu
Education:
B.E/Btech/Mtech/MCA - CSE/IT/ECE/EEE
Above 60%+ in all academics
Mandatory:
Must carry all original certificates to the interview and a copy of profileโฆ
Work location: Kovilpatti, Tamil Nadu
Education:
B.E/Btech/Mtech/MCA - CSE/IT/ECE/EEE
Above 60%+ in all academics
Mandatory:
Must carry all original certificates to the interview and a copy of profileโฆ
def bird_nest(forest, bird):
nest = []
total_length = 0
direction = 1
current_position = bird
visited = set()
while total_length < 100:
while forest[current_position] == 0 or current_position in visited:
current_position += direction
nest.append(current_position)
total_length += forest[current_position]
visited.add(current_position)
current_position = bird
direction *= -1
return nest
Databrick โ
nest = []
total_length = 0
direction = 1
current_position = bird
visited = set()
while total_length < 100:
while forest[current_position] == 0 or current_position in visited:
current_position += direction
nest.append(current_position)
total_length += forest[current_position]
visited.add(current_position)
current_position = bird
direction *= -1
return nest
Databrick โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
List<Integer> results = new ArrayList<>();
int counter = 1;
Map<Integer, Integer> allocationMap = new HashMap<>();
for (int[] query : queries) {
if (query[0] == 0) {
int length = query[1];
int result = -1;
for (int i = 0; i <= memory.length - length; i++) {
boolean canAllocate = true;
for (int j = 0; j < length; j++) {
if (memory[i + j] != 0) {
canAllocate = false;
break;
}
}
if (canAllocate) {
for (int j = 0; j < length; j++) {
memory[i + j] = counter;
}
allocationMap.put(counter, length);
result = counter++;
break;
}
}
results.add(result);
} else if (query[0] == 1) {
int id = query[1];
if (!allocationMap.containsKey(id)) {
results.add(-1);
continue;
}
int length = allocationMap.get(id);
boolean erased = false;
for (int i = 0; i < memory.length; i++) {
if (memory[i] == id) {
for (int j = 0; j < length; j++) {
memory[i + j] = 0;
}
allocationMap.remove(id);
results.add(length);
erased = true;
break;
}
}
if (!erased) {
results.add(-1);
}
}
}
int[] resultArray = new int[results.size()];
for (int i = 0; i < results.size(); i++) {
resultArray[i] = results.get(i);
}
return resultArray;
}
int counter = 1;
Map<Integer, Integer> allocationMap = new HashMap<>();
for (int[] query : queries) {
if (query[0] == 0) {
int length = query[1];
int result = -1;
for (int i = 0; i <= memory.length - length; i++) {
boolean canAllocate = true;
for (int j = 0; j < length; j++) {
if (memory[i + j] != 0) {
canAllocate = false;
break;
}
}
if (canAllocate) {
for (int j = 0; j < length; j++) {
memory[i + j] = counter;
}
allocationMap.put(counter, length);
result = counter++;
break;
}
}
results.add(result);
} else if (query[0] == 1) {
int id = query[1];
if (!allocationMap.containsKey(id)) {
results.add(-1);
continue;
}
int length = allocationMap.get(id);
boolean erased = false;
for (int i = 0; i < memory.length; i++) {
if (memory[i] == id) {
for (int j = 0; j < length; j++) {
memory[i + j] = 0;
}
allocationMap.remove(id);
results.add(length);
erased = true;
break;
}
}
if (!erased) {
results.add(-1);
}
}
}
int[] resultArray = new int[results.size()];
for (int i = 0; i < results.size(); i++) {
resultArray[i] = results.get(i);
}
return resultArray;
}
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
def find_local_maxima(matrix):
def is_local_maximum(matrix, i, j):
val = matrix[i][j]
if val == 0:
return False
for di in [-1, 0, 1]:
for dj in [-1, 0, 1]:
if di == 0 and dj == 0:
continue
ni, nj = i + di, j + dj
if 0 <= ni < len(matrix) and 0 <= nj < len(matrix[0]):
if matrix[ni][nj] >= val:
return False
return True
local_maxima = []
for i in range(len(matrix)):
for j in range(len(matrix[0])):
if is_local_maximum(matrix, i, j):
local_maxima.append((i, j))
return local_maxima[:2]
def is_local_maximum(matrix, i, j):
val = matrix[i][j]
if val == 0:
return False
for di in [-1, 0, 1]:
for dj in [-1, 0, 1]:
if di == 0 and dj == 0:
continue
ni, nj = i + di, j + dj
if 0 <= ni < len(matrix) and 0 <= nj < len(matrix[0]):
if matrix[ni][nj] >= val:
return False
return True
local_maxima = []
for i in range(len(matrix)):
for j in range(len(matrix[0])):
if is_local_maximum(matrix, i, j):
local_maxima.append((i, j))
return local_maxima[:2]
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
int solution(vector<int>& A, vector<int>& B) {
int n = A.size();
vector<vector<int>> graph(n + 1);
vector<bool> visited(n + 1, false);
int count = 0;
unordered_map<string, int> directions;
for (int i = 0; i < n; ++i) {
graph[A[i]].push_back(B[i]);
graph[B[i]].push_back(A[i]);
string directionKey = to_string(A[i]) + "->" + to_string(B[i]);
directions[directionKey] = 0;
}
function<void(int)> dfs = [&](int city) {
visited[city] = true;
for (int neighbor : graph[city]) {
if (visited[neighbor]) {
continue;
}
string changedDirectionKey = to_string(neighbor) + "->" + to_string(city);
if (directions.find(changedDirectionKey) == directions.end()) {
count++;
}
dfs(neighbor);
}
};
dfs(0);
return count;
}
int n = A.size();
vector<vector<int>> graph(n + 1);
vector<bool> visited(n + 1, false);
int count = 0;
unordered_map<string, int> directions;
for (int i = 0; i < n; ++i) {
graph[A[i]].push_back(B[i]);
graph[B[i]].push_back(A[i]);
string directionKey = to_string(A[i]) + "->" + to_string(B[i]);
directions[directionKey] = 0;
}
function<void(int)> dfs = [&](int city) {
visited[city] = true;
for (int neighbor : graph[city]) {
if (visited[neighbor]) {
continue;
}
string changedDirectionKey = to_string(neighbor) + "->" + to_string(city);
if (directions.find(changedDirectionKey) == directions.end()) {
count++;
}
dfs(neighbor);
}
};
dfs(0);
return count;
}
โค1
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
vector<int> row, col;
void dfs(vector<vector<int>>& matrix, vector<vector<bool>>& visited, int x, int y)
{
int rows = matrix.size();
int cols = matrix[0].size();
visited[x][y] = true;
for (int k = 0; k < row.size(); ++k)
{
int newX = x + row[k];
int newY = y + col[k];
if (newX >= 0 && newX < rows && newY >= 0 && newY < cols && matrix[newX][newY] == 1 && !visited[newX][newY])
{
dfs(matrix, visited, newX, newY);
}
}
}
int hello(vector<vector<int>>& matrix, int adj)
{
int rows = matrix.size();
int cols = matrix[0].size();
vector<vector<bool>> visited(rows, vector<bool>(cols, false));
int count = 0;
for (int i = 0; i < rows; ++i)
{
for (int j = 0; j < cols; ++j)
{
if (matrix[i][j] == 1 && !visited[i][j])
{
count++;
dfs(matrix, visited, i, j);
}
}
}
return count;
}
int main() {
int adj, rows, cols;
cin >> adj;
cin >> rows >> cols;
vector<vector<int>> matrix(rows, vector<int>(cols));
for (int i = 0; i < rows; ++i) {
for (int j = 0; j < cols; ++j) {
cin >> matrix[i][j];
}
}
if (adj == 1) {
row = {0, 0};
col = {-1, 1};
} else if (adj == 2) {
row = {-1, 1};
col = {0, 0};
} else if (adj == 3) {
row = {-1, -1, 1, 1};
col = {-1, 1, -1, 1};
} else if (adj == 4) {
row = {0, 0, -1, 1};
col = {-1, 1, 0, 0};
} else if (adj == 5) {
row = {-1, -1, -1, 0, 0, 1, 1, 1};
col = {-1, 0, 1, -1, 1, -1, 0, 1};
}
int result = hello(matrix, adj);
cout << result << endl;
return 0;
}
HPC programming โ
#include <vector>
#include <queue>
using namespace std;
vector<int> row, col;
void dfs(vector<vector<int>>& matrix, vector<vector<bool>>& visited, int x, int y)
{
int rows = matrix.size();
int cols = matrix[0].size();
visited[x][y] = true;
for (int k = 0; k < row.size(); ++k)
{
int newX = x + row[k];
int newY = y + col[k];
if (newX >= 0 && newX < rows && newY >= 0 && newY < cols && matrix[newX][newY] == 1 && !visited[newX][newY])
{
dfs(matrix, visited, newX, newY);
}
}
}
int hello(vector<vector<int>>& matrix, int adj)
{
int rows = matrix.size();
int cols = matrix[0].size();
vector<vector<bool>> visited(rows, vector<bool>(cols, false));
int count = 0;
for (int i = 0; i < rows; ++i)
{
for (int j = 0; j < cols; ++j)
{
if (matrix[i][j] == 1 && !visited[i][j])
{
count++;
dfs(matrix, visited, i, j);
}
}
}
return count;
}
int main() {
int adj, rows, cols;
cin >> adj;
cin >> rows >> cols;
vector<vector<int>> matrix(rows, vector<int>(cols));
for (int i = 0; i < rows; ++i) {
for (int j = 0; j < cols; ++j) {
cin >> matrix[i][j];
}
}
if (adj == 1) {
row = {0, 0};
col = {-1, 1};
} else if (adj == 2) {
row = {-1, 1};
col = {0, 0};
} else if (adj == 3) {
row = {-1, -1, 1, 1};
col = {-1, 1, -1, 1};
} else if (adj == 4) {
row = {0, 0, -1, 1};
col = {-1, 1, 0, 0};
} else if (adj == 5) {
row = {-1, -1, -1, 0, 0, 1, 1, 1};
col = {-1, 0, 1, -1, 1, -1, 0, 1};
}
int result = hello(matrix, adj);
cout << result << endl;
return 0;
}
HPC programming โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐1
s = [0]
def mapper(b):
num_dict = {0: 1, 1: 2, 2: 0}
return num_dict[b]
class tmap:
def __init__(self, fun, s):
self.fun = fun
self.list = s
self.cachedlen = len(self.list)
def __getitem__(self, i):
return self.fun(self.list[i])
def __len__(self):
return self.cachedlen
class concat:
def __init__(self, s1):
self.s1 = s1
self.s2 = tmap(mapper, self.s1)
self.cachedlen = len(s1) * 2
def __getitem__(self, i):
if i < len(self.s1):
return self.s1[i]
else:
return self.s2[i - len(self.s1)]
def __len__(self):
return self.cachedlen
for i in range(30):
s = concat(s)
# Use s[n] to obtain the n-th number in the sequence
print(len(s))
Who have Uber, Sprinklr, DE Shaw exam guys?
Send questions here solutions will be provide
Send questions here solutions will be provide
๐3
def solve(N, M, A):
from functools import lru_cache
import sys
@lru_cache(None)
def dp(mask):
if mask == 0:
return 0
res = sys.maxsize
for i in range(N):
if mask & (1 << i):
for j in range(M):
res = min(res, A[i][j] | dp(mask ^ (1 << i)))
return res
full_mask = (1 << N) - 1
return dp(full_mask)
# Input reading
if name == "main":
import sys
input = sys.stdin.read
data = input().split()
N = int(data[0])
M = int(data[1])
A = []
idx = 2
for i in range(N):
A.append(list(map(int, data[idx:idx + M])))
idx += M
print(solve(N, M, A))
Minimum possible sum โ
from functools import lru_cache
import sys
@lru_cache(None)
def dp(mask):
if mask == 0:
return 0
res = sys.maxsize
for i in range(N):
if mask & (1 << i):
for j in range(M):
res = min(res, A[i][j] | dp(mask ^ (1 << i)))
return res
full_mask = (1 << N) - 1
return dp(full_mask)
# Input reading
if name == "main":
import sys
input = sys.stdin.read
data = input().split()
N = int(data[0])
M = int(data[1])
A = []
idx = 2
for i in range(N):
A.append(list(map(int, data[idx:idx + M])))
idx += M
print(solve(N, M, A))
Minimum possible sum โ