本段 546 题 | 来源:backend + general + design | 知识点:其他/未分类
531. Given two nodes in an arbitrary tree, write a function to find the most-specific-common-ancestor.
给定任意树中的两个节点,编写一个函数来查找最具体的共同祖先。
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: NTT DATA
- id: 69b37bff58d557c902bb6632 | 官方: 否 | 付费: 否
答案:
Below example Python function to find the most specific common ancestor of two nodes in an arbitrary tree:
以下是一个在任意树中查找两个节点最具体共同祖先的Python函数示例:
def find_lca(root, node1, node2):
def find_lca(root, node1, node2):
if root is None:
if root is None:
return None
return None
if root == node1 or root == node2:
if root == node1 or root == node2:
return root
return root
left = find_lca(root.left, node1, node2)
left = find_lca(root.left, node1, node2)
right = find_lca(root.right, node1, node2)
right = find_lca(root.right, node1, node2)
if left and right:
if left and right:
return root
return root
return left or right
return left or right
This function takes three parameters: root is the root node of the tree, and node1 and node2 are the two nodes for which we want to find the most specific common ancestor. The function recursively traverses the tree from the root node and checks whether the root node is either node1 or node2. If it is, then the function returns the root node. Otherwise, the function recursively searches the left and right subtrees for node1 and node2.
这个函数接受三个参数:root是树的根节点,node1和node2是我们想要找到最近共同祖先的两个节点。该函数从根节点开始递归地遍历树,并检查根节点是否为node1或node2。如果是,则函数返回根节点。否则,函数递归地在左子树和右子树中搜索node1和node2。
If both node1 and node2 are found in the left and right subtrees, then the current root node is the most specific common ancestor. Otherwise, the function returns the node found in either the left or right subtree, whichever is not None. If neither node is found in the tree, the function returns None.
如果node1和node2都分别在左子树和右子树中找到,那么当前的根节点就是最近共同祖先。否则,函数返回左子树或右子树中找到的那个非空节点。如果树中两个节点都未找到,函数返回None。
532. Given a list of n integers, write a function to determine if any two sum to k [2]?
给定一个包含n个整数的列表,编写一个函数来确定是否有任意两个数的和为k [2]?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: NTT DATA
- id: 69b37bff58d557c902bb6635 | 官方: 否 | 付费: 否
答案:
Below example Python function to determine if any two integers in a list sum to a given value k:
下面是一个示例Python函数,用于确定列表中任意两个整数之和是否等于给定值k:
def has_sum_to_k(nums, k):
def has_sum_to_k(nums, k):
seen = set()
seen = set()
for num in nums:
for num in nums:
if k - num in seen:
if k - num in seen:
return True
return True
seen.add(num)
seen.add(num)
return False
return False
This function takes two parameters: nums is the list of integers, and k is the target sum. The function uses a set called seen to keep track of the integers that have been seen so far in the list.
这个函数接受两个参数:nums是整数列表,k是目标和。该函数使用一个名为seen的集合来跟踪列表中到目前为止已经出现过的整数。
The function iterates over each integer in the list and checks whether k - num is already in the set. If it is, then we have found two integers that sum to k, and the function returns True. Otherwise, the current integer num is added to the set, and the function continues iterating over the list.
该函数遍历列表中的每个整数,并检查 k - num 是否已经在集合中。如果是,则已找到两个和为 k 的整数,函数返回 True。否则,将当前整数 num 添加到集合中,并继续遍历列表。
If no two integers are found that sum to k, then the function returns False after iterating over the entire list.
如果遍历完整个列表后仍未找到两个和为 k 的整数,则函数返回 False。
This algorithm has a time complexity of O(n), because we iterate over the list of n integers exactly once, and the set operations take constant time on average.
该算法的时间复杂度为 O(n),因为我们仅遍历 n 个整数的列表一次,而集合操作平均耗时恒定。
533. Given k guards in a museum with n rooms that are connected in a certain way (was drawn on a whiteboard when I was asked this) write a function to determine which of the k guards is closest to each of the n rooms?
给定博物馆中有 k 个守卫和 n 个房间,房间之间以某种方式相连(当我被问到该问题时,连接方式画在白板上),编写一个函数来确定每个房间最接近的守卫是哪一个?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: NTT DATA
- id: 69b37bff58d557c902bb6638 | 官方: 否 | 付费: 否
答案:
Below example Python function that finds the closest guard to each room in a museum
下面是一个示例 Python 函数,用于查找博物馆中每个房间最近的守卫
from collections import deque
from collections import deque
def find_closest_guards(n, guards, connections):
def find_closest_guards(n, guards, connections):
Initialize the result dictionary
result = {i: None for i in range(n)}
result = {i: None for i in range(n)}
Build a graph from the connections list
graph = {i: [] for i in range(n)}
graph = {i: [] for i in range(n)}
for a, b in connections:
for a, b in connections:
graph[a].append(b)
graph[a].append(b)
graph[b].append(a)
graph[b].append(a)
For each guard, perform a BFS from its location to all reachable rooms
for guard in guards:
for guard in guards:
visited = set()
visited = set()
queue = deque([(guard, 0)])
queue = deque([(guard, 0)])
while queue:
while queue:
room, dist = queue.popleft()
room, dist = queue.popleft()
if room in visited:
if room in visited:
continue
continue
visited.add(room)
visited.add(room)
Update the result for the current room if the guard is closer
if result[room] is None or dist < resultroom:
if result[room] is None or dist < resultroom:
result[room] = (guard, dist)
result[room] = (guard, dist)
Enqueue all reachable rooms that haven't been visited yet
for neighbor in graph[room]:
for neighbor in graph[room]:
if neighbor not in visited:
if neighbor not in visited:
queue.append((neighbor, dist + 1))
queue.append((neighbor, dist + 1))
return result
return result
This function takes three parameters: n is the number of rooms in the museum, guards is a list of k integers representing the room numbers where the guards are located, and connections is a list of tuples representing the connections between rooms in the museum.
此函数接受三个参数:n 是博物馆中的房间数量,guards 是一个包含 k 个整数的列表,代表警卫所在房间的编号,connections 是一个元组列表,代表博物馆中房间之间的连接关系。
The function builds a graph from the connections list, where each room is a node in the graph, and edges represent connections between rooms. Then, for each guard, the function performs a breadth-first search (BFS) from the guard's location to all reachable rooms, keeping track of the distance from the guard to each visited room.
该函数根据 connections 列表构建一个图,其中每个房间是图中的一个节点,边代表房间之间的连接。然后,对于每个警卫,函数从警卫所在位置执行广度优先搜索(BFS)到所有可达房间,并记录从警卫到每个已访问房间的距离。
As the BFS progresses, the function updates the result dictionary with the closest guard to each room that has been visited so far. Finally, the function returns the result dictionary, where the value for each room is a tuple representing the closest guard and the distance from that guard to the room.
随着 BFS 的推进,函数更新 result 字典,记录每个已访问房间最近的一个警卫。最后,函数返回 result 字典,其中每个房间的值是一个元组,代表最近的警卫及该警卫到该房间的距离。
This algorithm has a time complexity of O(kn + m), where m is the number of connections between rooms. This is because we perform a BFS for each of the k guards, visiting up to all n rooms in the worst case, and the graph construction takes O(m) time.
该算法的时间复杂度为 O(kn + m),其中 m 是房间之间连接的数量。这是因为我们对每个警卫执行一次 BFS,最坏情况下会访问所有 n 个房间,而图构建的时间为 O(m)。
534. Given an amount charged and cash tendered, write a function to make change using the fewest number of bills/coins possible?
给定一个应付金额和支付的现金,编写一个函数,用最少的面额的纸币/硬币来找零?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: NTT DATA
- id: 69b37bff58d557c902bb663e | 官方: 否 | 付费: 否
答案:
Below example Python function to make change using the fewest number of bills/coins possible:
下面是一个示例 Python 函数,使用最少面额的纸币/硬币来找零:
def make_change(amount_charged, cash_tendered):
def make_change(amount_charged, cash_tendered):
Define the available denominations of bills/coins
denominations = [100, 50, 20, 10, 5, 1, 0.25, 0.1, 0.05, 0.01]
denominations = [100, 50, 20, 10, 5, 1, 0.25, 0.1, 0.05, 0.01]
Calculate the change owed
change = cash_tendered - amount_charged
change = cash_tendered - amount_charged
Initialize a dictionary to store the count of each denomination of bill/coin
change_dict = {}
change_dict = {}
Loop through each denomination of bill/coin
for d in denominations:
for d in denominations:
Calculate the number of bills/coins of this denomination needed to make change
count = int(change / d)
count = int(change / d)
if count > 0:
if count > 0:
Add the count to the dictionary if it is greater than zero
change_dict[d] = count
change_dict[d] = count
Update the amount of change owed
change -= count * d
change -= count * d
Return the dictionary of counts
return change_dict
return change_dict
This function takes two parameters amount_charged and cash_tendered, which are the amount charged and the cash tendered, respectively. The function defines a list of denominations containing the available denominations of bills/coins. The function calculates the change owed by subtracting the amount_charged from the cash_tendered.
该函数接受两个参数amount_charged和cash_tendered,分别为应付金额和实付现金。该函数定义了一个包含可用纸币/硬币面额的列表。通过从cash_tendered中减去amount_charged来计算应付的找零金额。
The function then initializes an empty dictionary change_dict to store the count of each denomination of bill/coin needed to make change. The function loops through each denomination of bill/coin in denominations and calculates the number of bills/coins of that denomination needed to make change using integer division. If the count is greater than zero, the count is added to the change_dict dictionary, and the amount of change owed is updated by subtracting the value of the bills/coins.
该函数随后初始化一个空的字典change_dict,用于存储每种面额所需的纸币/硬币数量。函数遍历denominations中的每种面额,并使用整数除法计算找零所需的该面额纸币/硬币数量。如果计数大于零,则将计数添加到change_dict字典中,并通过减去对应面额的价值来更新应付的找零金额。
Finally, the function returns the change_dict dictionary containing the count of each denomination of bill/coin needed to make change.
最后,该函数返回change_dict字典,其中包含找零所需的每种面额的纸币/硬币数量。
535. Find the largest / smallest number from a set?
如何求集合中的最大/最小数?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37bff58d557c902bb6654 | 官方: 否 | 付费: 否
答案:
To find the largest or smallest number from a set in Java, you can use the following approaches: - Iteration: You can iterate over the set and keep track of the maximum or minimum value seen so far. Here is an example of how to find the maximum value in a set using this approach:
若要在Java中找出集合中的最大或最小数字,可以使用以下方法:- 迭代:可以遍历集合,并跟踪当前看到的最大值或最小值。以下是使用此方法查找集合中最大值的示例:
Setset = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5));
Setset = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5));
int max = Integer.MIN_VALUE;
int max = Integer.MIN_VALUE;
for (int num : set) {
for (int num : set) {
max = Math.max(max, num);
max = Math.max(max, num);
}
System.out.println(max);
System.out.println(max);
This will print out the maximum value in the set, which is 5. - Sorting: You can also sort the set using a sorting algorithm (such as quicksort or mergesort) or the Java Collections class's sort() method, and then return the first or last element of the sorted set as the maximum or minimum value, respectively. Here is an example of how to find the minimum value in a set using this approach:
这将打印出集合中的最大值,即 5。 - 排序:你也可以使用排序算法(如快速排序或归并排序)或Java集合类的sort()方法对集合进行排序,然后分别返回排序后集合的第一个或最后一个元素作为最小值或最大值。以下是一个使用这种方法查找集合中最小值的示例:
Setset = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5));
Setset = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5));
ListsortedSet = new ArrayList<>(set);
ListsortedSet = new ArrayList<>(set);
Collections.sort(sortedSet);
Collections.sort(sortedSet);
System.out.println(sortedSet.get(0));
System.out.println(sortedSet.get(0));
This will also print out the minimum value in the set, which is 1.
这也会打印出集合中的最小值,即 1。
536. What is Lucas' theorem?
什么是卢卡斯定理?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37bff58d557c902bb6660 | 官方: 否 | 付费: 否
答案:
Lucas' theorem is a result in number theory that describes the behavior of the binomial coefficient (n choose k) when computed modulo a prime number p. The theorem states that if n and k are nonnegative integers, and p is a prime number, then:
卢卡斯定理是数论中的一个结果,描述了当计算模素数p的二项式系数(n选择k)时的行为。该定理指出,如果n和k是非负整数,且p是素数,则:
(n choose k) = ((n/p) choose (k/p)) * ((n%p) choose (k%p)) (mod p)
(n选择k) = ((n/p)选择(k/p)) * ((n%p)选择(k%p)) (模p)
Where ((n/p) choose (k/p)) is the binomial coefficient computed with the quotients of the numbers and ((n%p) choose (k%p)) is the binomial coefficient computed with the remainder of the numbers after dividing by prime p.
其中((n/p)选择(k/p))是使用数字的商计算的二项式系数,并且((n%p)选择(k%p))是使用数字除以素数p后的余数计算的二项式系数。
Lucas' theorem is particularly useful when computing binomial coefficients modulo a prime number, as it allows one to break down the computation into smaller subproblems, which can then be solved independently.
卢卡斯定理在计算模素数的二项式系数时特别有用,因为它允许将计算分解为更小的子问题,这些子问题可以独立解决。
The theorem can be used in many different ways, for example, it can be used in computational number theory, coding theory, and cryptography.
该定理可以以多种不同方式使用,例如,它可以用于计算数论、编码理论和密码学中。
In computational number theory, Lucas' theorem can be used to compute binomial coefficients quickly when the modulus is a prime number, while in coding theory, it can be used to determine the weight distribution of certain error-correcting codes. And in cryptography, it can be used to speed up the calculation of modular exponentiation.
在计算数论中,卢卡斯定理可用于在模数为素数时快速计算二项式系数,而在编码理论中,它可用于确定某些纠错码的权重分布。在密码学中,它还可用于加速模幂运算的计算。
It's named after the French mathematician Edouard Lucas who proved this theorem in the 19th century.
它以法国数学家爱德华·卢卡斯命名,他在19世纪证明了该定理。
537. Write a query that returns the year, month, day, species_id and weight in mg?
编写一个查询,返回年份、月份、日期、物种ID和以毫克为单位的重量?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37bff58d557c902bb6666 | 官方: 否 | 付费: 否
答案:
To return the year, month, day, species_id, and weight in mg from a table in a database, you can use a SELECT statement with the appropriate column names.
要从数据库中的表中返回年份、月份、日期、物种ID和以毫克为单位的重量,可以使用带有适当列名的SELECT语句。
For example, consider a table called "Weights" with the following structure:
例如,假设有一个名为“Weights”的表,其结构如下:
+------------+------------+-------+----------+
| RecordID | Date | SpeciesID | Weight |
|---|
+------------+------------+-------+----------+
| 1 | 2020-01-01 | 1 | 100 |
|---|---|---|---|
| 2 | 2020-01-02 | 1 | 105 |
| 3 | 2020-01-03 | 2 | 200 |
+------------+------------+-------+----------+
To return the year, month, day, species_id, and weight in mg from the "Weights" table, you can use the following SELECT statement:
要从“Weights”表中返回年份、月份、日期、物种ID和以毫克为单位的重量,可以使用以下SELECT语句:
SELECT
选择
YEAR(Date) AS Year,
年份(Date)作为 Year,
MONTH(Date) AS Month,
MONTH(Date) AS Month,
DAY(Date) AS Day,
DAY(Date) AS Day,
SpeciesID,
SpeciesID,
Weight
Weight
FROM Weights;
FROM Weights;
This will return the following results:
这将返回以下结果:
+------+-------+----+----------+-------+
| Year | Month | Day | SpeciesID | Weight |
|---|
+------+-------+----+----------+-------+
| 2020 | 1 | 1 | 1 | 100 |
|---|---|---|---|---|
| 2020 | 1 | 2 | 1 | 105 |
| 2020 | 1 | 3 | 2 | 200 |
+------+-------+----+----------+-------+
538. Write a query that returns the day, month, year, species_id, and weight (in kg) for individuals caught on Plot 1 that weigh more than 75 g?
编写一个查询,返回在 Plot 1 捕获的、体重大于 75 克的个体的一天、月份、年份、物种 ID 和体重(以千克为单位)?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37c0058d557c902bb6669 | 官方: 否 | 付费: 否
答案:
To return the day, month, year, species_id, and weight (in kg) for individuals caught on Plot 1 that weigh more than 75 g from a table in a database, you can use a SELECT statement with a WHERE clause to specify the plot and weight criteria. You can also use the DATEPART function to extract the day, month, and year from the "Date" column and the CONVERT function to convert the weight from grams to kilograms.
为了从数据库中的表中返回在 Plot 1 捕获的、体重大于 75 克的个体的一天、月份、年份、物种 ID 和体重(以千克为单位),可以使用带 WHERE 子句的 SELECT 语句来指定地块和体重条件。还可以使用 DATEPART 函数从“Date”列提取天、月和年,并使用 CONVERT 函数将体重从克转换为千克。
For example, consider a table called "Weights" with the following structure:
例如,假设有一个名为“Weights”的表,其结构如下:
+------------+------------+-------+----------+-------+
| RecordID | Date | Plot | SpeciesID | Weight |
|---|
+------------+------------+-------+----------+-------+
| 1 | 2020-01-01 | 1 | 1 | 100 |
|---|---|---|---|---|
| 2 | 2020-01-02 | 1 | 1 | 105 |
| 3 | 2020-01-03 | 2 | 2 | 200 |
+------------+------------+-------+----------+-------+To return the day, month, year, species_id, and weight in kg for individuals caught on Plot 1 that weigh more than 75 g, you can use the following SELECT statement:
+------------+------------+-------+----------+-------+要返回在 Plot 1 捕获的、体重大于 75 克的个体的一天、月份、年份、物种 ID 和体重(以千克为单位),可以使用以下 SELECT 语句:
To return the day, month, year, species_id, and weight in kg for individuals caught on Plot 1 that weigh more than 75 g, you can use the following SELECT statement:
要返回在 Plot 1 捕获的、体重大于 75 克的个体的一天、月份、年份、物种 ID 和体重(以千克为单位),可以使用以下 SELECT 语句:
SELECT
选择
DATEPART(DAY, Date) AS Day,
DATEPART(DAY, Date) AS Day,
DATEPART(MONTH, Date) AS Month,
DATEPART(MONTH, Date) AS Month,
DATEPART(YEAR, Date) AS Year,
DATEPART(YEAR, Date) AS Year,
SpeciesID,
SpeciesID,
CONVERT(float, Weight) / 1000 AS WeightKg
CONVERT(float, Weight) / 1000 AS WeightKg
FROM Weights
FROM Weights
WHERE Plot = 1 AND Weight > 75;
WHERE Plot = 1 AND Weight > 75;
This will return the following results:
这将返回以下结果:
+----+-------+------+----------+----------+
| Day | Month | Year | SpeciesID | WeightKg |
|---|
+----+-------+------+----------+----------+
| 1 | 1 | 2020 | 1 | 0.1 |
|---|---|---|---|---|
| 2 | 1 | 2020 | 1 | 0.105 |
+----+-------+------+----------+----------+
539. Write a query that returns year, species_id, and weight in kg from the surveys table, sorted with the largest weights at the top?
编写一个查询,从 surveys 表中返回年份、物种 ID 和以千克为单位的体重,并按体重从大到小排序?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37c0058d557c902bb666c | 官方: 否 | 付费: 否
答案:
To return the year, species_id, and weight in kg from a table in a database, sorted with the largest weights at the top, you can use a SELECT statement with the appropriate column names and an ORDER BY clause to specify the sorting criteria. You can also use the CONVERT function to convert the weight from grams to kilograms.
要从数据库中的表中返回年份、物种 ID 和以千克为单位的体重,并按体重从大到小排序,可以使用带有适当列名的 SELECT 语句和 ORDER BY 子句来指定排序条件。还可以使用 CONVERT 函数将体重从克转换为千克。
For example, consider a table called "Surveys" with the following structure:
例如,考虑一个名为“Surveys”的表,其结构如下:
+------------+------------+-------+----------+
| RecordID | Date | SpeciesID | Weight |
|---|
+------------+------------+-------+----------+
| 1 | 2020-01-01 | 1 | 100 |
|---|---|---|---|
| 2 | 2020-01-02 | 1 | 105 |
| 3 | 2020-01-03 | 2 | 200 |
+------------+------------+-------+----------+
To return the year, species_id, and weight in kg from the "Surveys" table, sorted with the largest weights at the top, you can use the following SELECT statement:
要从“Surveys”表中返回年份、物种 ID 和以千克为单位的体重,并按体重从大到小排序,可以使用以下 SELECT 语句:
SELECT
选择
YEAR(Date) AS Year,
年份(Date)作为 Year,
SpeciesID,
SpeciesID,
CONVERT(float, Weight) / 1000 AS WeightKg
CONVERT(float, Weight) / 1000 AS WeightKg
FROM Surveys
来自 Surveys
ORDER BY WeightKg DESC;
按 WeightKg 降序排序;
This will return the following results:
这将返回以下结果:
+------+----------+----------+
| Year | SpeciesID | WeightKg |
|---|
+------+----------+----------+
| 2020 | 2 | 0.2 |
|---|---|---|
| 2020 | 1 | 0.105 |
| 2020 | 1 | 0.1 |
+------+----------+----------+
540. What is MVC?
什么是 MVC?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37c0058d557c902bb6676 | 官方: 否 | 付费: 否
答案:
MVC stands for Model-View-Controller, and it is a software design pattern that separates an application into three main components: the model, the view, and the controller.
MVC 代表 Model-View-Controller,它是一种软件设计模式,将应用程序分为三个主要组件:模型、视图和控制器。
The model represents the data and logic of the application. It is responsible for managing the data and providing the necessary business logic to manipulate and process the data.
模型表示应用程序的数据和逻辑。它负责管理数据,并提供必要的业务逻辑来操作和处理数据。
The view represents the user interface (UI) of the application. It is responsible for displaying the data to the user and providing a way for the user to interact with the application.
视图代表应用程序的用户界面(UI)。它负责向用户显示数据,并提供一种方式让用户与应用程序进行交互。
The controller is the bridge between the model and the view. It receives input from the user, processes it using the model, and then updates the view to reflect the changes.
控制器是模型和视图之间的桥梁。它接收用户的输入,使用模型进行处理,然后更新视图以反映这些变化。
The MVC pattern has several benefits, including:
MVC模式有几个优点,包括:
Separation of concerns: Each component of the MVC pattern is responsible for a specific aspect of the application, which helps to keep the code organized and maintainable. 2. Reusability: Because the components of the MVC pattern are independent of each other, they can be easily reused in other applications. 3. Testability: The separation of concerns in the MVC pattern makes it easier to test individual components of the application. 4. Flexibility: The MVC pattern allows developers to easily modify the user interface or the business logic of the application without affecting the other components.
- 关注点分离:MVC模式中的每个组件负责应用程序的特定方面,这有助于保持代码的组织性和可维护性。 2. 可重用性:由于MVC模式的组件相互独立,它们可以轻松地重用于其他应用程序。 3. 可测试性:MVC模式中的关注点分离使得测试应用程序的各个组件变得更加容易。 4. 灵活性:MVC模式允许开发人员轻松修改应用程序的用户界面或业务逻辑,而不影响其他组件。
The Model-View-Controller (MVC) pattern offers several advantages in software development. It provides separation of concerns, reusability, testability, and flexibility. By separating the responsibilities of the application into different components, the MVC pattern promotes a more organized and maintainable codebase. This pattern is widely used in web application development and has proven to be effective in delivering high-quality software solutions.
模型-视图-控制器(MVC)模式在软件开发中提供了多个优势。它提供了关注点分离、可重用性、可测试性和灵活性。通过将应用程序的责任分离到不同的组件中,MVC模式促进了更有序和可维护的代码库。该模式广泛用于Web应用程序开发,并已被证明能有效交付高质量的软件解决方案。
541. Define the term 'std’?
定义术语“std”?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37c0058d557c902bb6687 | 官方: 否 | 付费: 否
答案:
In the context of programming and computer science, "std" is often used as an abbreviation for "standard." It is commonly used in reference to the C++ Standard Template Library (STL), which is a collection of reusable components for C++ programming.
在编程和计算机科学的背景下,“std”通常用作“standard”(标准)的缩写。它通常用于指代C++标准模板库(STL),这是一个为C++编程提供的可重用组件集合。
For example, "std::vector" is a container class in the STL that is used to store a collection of objects in a dynamic array. "std::sort" is a function in the STL that is used to sort the elements of a container.
例如,“std::vector”是STL中的一个容器类,用于在动态数组中存储对象集合。“std::sort”是STL中的一个函数,用于对容器中的元素进行排序。
"std" is also used as an abbreviation for "standard output" or "standard error," which are streams in the C++ standard library that are used to output data to the console or to a file.
“std”也用作“标准输出”或“标准错误”的缩写,这些是C++标准库中的流,用于向控制台或文件输出数据。
For example, "std::cout" is an object in the C++ standard library that represents the standard output stream and can be used to output data to the console. "std::cerr" is an object in the C++ standard library that represents the standard error stream and can be used to output error messages to the console.
例如,“std::cout”是C++标准库中的一个对象,代表标准输出流,可用于向控制台输出数据。“std::cerr”是C++标准库中的一个对象,代表标准错误流,可用于向控制台输出错误消息。
542. Define object cloning?
定义对象克隆?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37c0058d557c902bb6690 | 官方: 否 | 付费: 否
答案:
Object cloning is the process of creating a copy of an object in a new memory location. In object-oriented programming languages, objects are often created using a "constructor" method, which is a special function that is used to create a new instance of the object.
对象克隆是在新的内存位置创建对象副本的过程。在面向对象的编程语言中,对象通常使用“构造函数”方法创建,这是一个特殊函数,用于创建对象的新实例。
Object cloning is similar to object creation, but it involves creating a copy of an existing object rather than creating a new object from scratch. This can be useful in situations where you want to create a new object that has the same state as an existing object, but you want to keep the two objects separate and independent.
对象克隆类似于对象创建,但它涉及创建现有对象的副本,而不是从头创建新对象。这在您想要创建一个与现有对象状态相同但保持两个对象独立和分离的新对象时很有用。
There are several ways to implement object cloning in different programming languages. In some languages, such as Java, the object cloning process is handled automatically by the runtime environment. In other languages, such as C++, object cloning must be implemented manually using specific techniques.
在不同的编程语言中有多种实现对象克隆的方法。在某些语言(如Java)中,对象克隆过程由运行时环境自动处理。在其他语言(如C++)中,对象克隆必须使用特定技术手动实现。
543. How long is the NTT Data Interview Process?
NTT Data面试流程需要多长时间?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37c0058d557c902bb66c9 | 官方: 否 | 付费: 否
答案:
Our industry and work environment operate at a fast pace, and our recruitment process reflects this. We prioritize prompt communication with every applicant to confirm the receipt of their application. Depending on the outcome of the application, candidates can expect to receive an email or phone call from one of our Talent Acquisition consultants within 48 hours.
我们的行业和工作环境以快节奏运作,并且我们的招聘流程反映了这一点。我们优先与每位申请人及时沟通,以确认收到他们的申请。根据申请结果,候选人预计将在48小时内收到我们一位人才招聘顾问的电子邮件或电话。
It is common for the interview process to extend over several weeks. It is recommended that applicants inquire about the company's recruitment process and timeline upon applying for a job to gain insight into what to anticipate. Meanwhile, it is wise to maintain organization and keep track of all interview process requirements and deadlines.
面试过程通常持续数周是很常见的。建议申请人在申请工作时询问公司的招聘流程和时间安排,以了解预期情况。同时,保持组织性并记录所有面试流程要求和截止日期是明智之举。
544. How can I get placed in NTT DATA?
我怎样才能在NTT DATA获得职位?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37c0058d557c902bb66cc | 官方: 否 | 付费: 否
答案:
To get placed in NTT DATA, you can follow these steps:
要在NTT DATA获得职位,您可以遵循以下步骤:
Check the eligibility criteria for the job role you are interested in on the NTT DATA website. 2. Apply for the job by submitting your resume and other necessary documents. 3. Prepare for the recruitment process, which may include a written test, technical interview, and HR interview. 4. During the recruitment process, showcase your skills and experience relevant to the job role. 5. If you successfully pass the recruitment process, you will receive an offer letter from NTT DATA.
- 在NTT DATA网站上查看您感兴趣的职位的资格标准。 2. 提交您的简历和其他必要文件来申请该职位。 3. 为招聘流程做好准备,这可能包括笔试、技术面试和人力资源面试。 4. 在招聘流程中,展示您与职位相关的技能和经验。 5. 如果您成功通过招聘流程,您将收到NTT DATA的录用通知书。
545. What is the fresher salary in NTT DATA?
NTT DATA的应届生薪资是多少?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37c0058d557c902bb66cf | 官方: 否 | 付费: 否
答案:
It's important to note that the salary for freshers at NTT Data can vary based on a number of factors, including your level of education, your skills and experience, the location of the role, and the specific role you are applying for.
重要的是要注意,NTT Data的应届生薪资可能因多种因素而有所不同,包括您的教育水平、技能和经验、职位所在地以及您申请的具体职位。
In general, however, the average salary for freshers at NTT Data in India is around ₹2.4 lakhs per year for those with less than 1 year of experience up to 4 years of experience. This salary range may be higher or lower depending on the specific role and location. It's always a good idea to do your own research and have a realistic understanding of salary expectations before applying for a job.
然而,一般来说,NTT Data在印度的应届生平均年薪约为24万卢比,适用于工作经验不足1年到4年的人。这个薪资范围可能根据具体职位和地点而有所高低。在申请工作前,自己进行研究并对薪资期望有一个现实的了解总是一个好主意。
546. Does NTT DATA provide a joining bonus?
NTT DATA是否提供入职奖金?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37c0058d557c902bb66d2 | 官方: 否 | 付费: 否
答案:
NTT Data does not offer a joining bonus to freshers. This benefit is only applicable to experienced individuals who possess niche skills and can join either immediately or within 15-30 days.
NTT Data不向应届生提供入职奖金。这项福利仅适用于拥有小众技能且能立即或在15至30天内入职的有经验人士。
It's worth noting that policies on joining bonuses can vary from company to company, and it's always a good idea to clarify this point during the job offer process.
值得注意的是,入职奖金政策因公司而异,在录用流程中明确这一点总是一个好主意。
While it's not uncommon for companies to offer joining bonuses, it's not always the case. It's always a good idea to ask about any potential bonuses or other perks during the job offer process and to negotiate for the best possible package.
虽然公司提供入职奖金并不罕见,但并非总是如此。在录用流程中询问任何潜在的奖金或其他福利,并协商最佳待遇总是一个好主意。
If a joining bonus is important to you, it's a good idea to bring this up during the negotiation process. Keep in mind that there are many other factors to consider when evaluating a job offer, including salary, benefits, and the overall opportunity for growth and development.
如果入职奖金对您很重要,那么在协商过程中提出这一点是个好主意。请记住,在评估录用通知时,许多其他因素也需要考虑,包括薪资、福利以及整体成长和发展机会。
547. Is the NTT Data interview hard?
NTT Data的面试难吗?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37c0058d557c902bb66d5 | 官方: 否 | 付费: 否
答案:
The NTT Data interview process may be challenging for some candidates, as it may involve a written test, group discussion, and technical interview. In the technical interview, candidates may be asked a variety of questions related to their technical skills and knowledge, and it's important to be prepared to answer these questions effectively.
NTT Data的面试流程对某些候选人来说可能具有挑战性,因为它可能涉及笔试、小组讨论和技术面试。在技术面试中,候选人可能被问到与其技术技能和知识相关的各种问题,准备有效回答这些问题很重要。
If we use a scale of 1 to 10, where 1 represents "easy" and 10 represents "difficult", the rating would be 4.
如果用1到10的评分标准来衡量,其中1代表“容易”,10代表“困难”,那么评分将是4。
To prepare for the NTT Data interview, it's a good idea to familiarize yourself with the technologies and programming languages used at the company, review common algorithms and data structures, practice coding, and review your work experience and projects. Additionally, it's a good idea to understand the company's business and culture and to be prepared to discuss your fit with the role and the company. Finally, it's always a good idea to be well-rested and to arrive on time to the interview, as these factors can impact your performance.
为了准备NTT Data面试,熟悉公司使用的技术和编程语言、复习常见算法和数据结构、练习编程以及回顾您的工作经验和项目是个好主意。此外,了解公司的业务和文化,并准备好讨论您与职位和公司的匹配度也很重要。最后,保持充分休息并准时到达面试现场总是个好主意,因为这些因素会影响您的表现。
548. Why do you want to work for NTT DATA?
你为什么想为NTT DATA工作?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37c0058d557c902bb66d8 | 官方: 否 | 付费: 否
答案:
NTT Data is a global IT services company that has a strong reputation for delivering high-quality services to its clients. The company has a diverse range of clients in industries such as financial services, manufacturing, and healthcare, and has a strong focus on innovation and sustainability.
NTT Data是一家全球IT服务公司,以向客户提供高质量服务而享有盛誉。该公司在金融服务、制造业和医疗保健等行业拥有多样化的客户群,并且高度重视创新和可持续性。
Working for a company like NTT Data could provide opportunities for professional growth and development, as well as the opportunity to work on challenging and meaningful projects that have a positive impact on clients and society. Additionally, NTT Data values diversity and inclusion, which aligns with my programming to treat all individuals with respect and empathy.
在像NTT Data这样的公司工作,可以提供专业成长和发展的机会,也有机会参与具有挑战性且有意义的项目,这些项目对客户和社会产生积极影响。此外,NTT Data重视多样性和包容性,这与我一贯以尊重和同理心对待所有人的原则相符。
Sample Answer:
示例回答:
I want to work for NTT DATA because it is a global company with a strong reputation for delivering innovative solutions to its clients. I am excited about the opportunity to work on challenging projects with talented colleagues and to continue growing my skills in a dynamic and supportive work environment.
我想为NTT DATA工作,因为它是一家全球性公司,以向客户提供创新解决方案而享有盛誉。我很高兴有机会与才华横溢的同事一起参与具有挑战性的项目,并在充满活力和支持性的工作环境中继续提升我的技能。
549. Does NTT Data pay well?
NTT Data的薪资待遇好吗?
- 知识点: 其他/未分类 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37c0058d557c902bb66db | 官方: 否 | 付费: 否
答案:
The average salary for a software engineer at NTT Data is around ₹6.0 lakhs per year, which is higher than the average salary for a software engineer in India, which is around ₹5.4 lakhs per year.
NTT Data软件工程师的平均年薪约为60万卢比,高于印度软件工程师的平均年薪(约54万卢比)。
It's worth noting that salary can vary based on a number of factors, including your level of education, your skills and experience, the location of the role, and the specific role you are applying for. It's always a good idea to do your own research and have a realistic understanding of salary expectations before applying for a job.
值得注意的是,薪资可能因多种因素而异,包括你的教育水平、技能和经验、职位所在地点以及你申请的特定职位。在申请工作之前,最好自行调研并对薪资期望有现实的了解。
550. The company is in need of storage. How can HCI assist the company in this situation?
公司需要存储解决方案。在这种情况下,HCI如何帮助公司?
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0258d557c902bb67a8 | 官方: 否 | 付费: 否
答案:
Data is rising at a rate of 50% or more each year, and it is being stored on the block, file, or object storage systems. New visibility and control requirements are putting more pressure on storage managers. And cloud storage has grown in importance to the point where it must be incorporated in whatsoever storage architecture. Legacy storage infrastructure, on the other hand, is unable to meet the demands imposed by these new realities. It's compartmentalised, which adds to the complexity, inhibits flexibility, and lowers usage. Legacy infrastructure does not provide enough data visibility to fulfil the new compliance or control requirements. It was created before the cloud, making the deployment of cloud-like capabilities extremely challenging.
数据每年以50%或更高的速度增长,并存储于块存储、文件存储或对象存储系统中。新的可见性和控制要求给存储管理者带来了更大的压力。而云存储的重要性已提升到必须纳入任何存储架构的程度。另一方面,传统存储基础设施无法满足这些新现实带来的要求。它被分割成孤岛,增加了复杂性,抑制了灵活性,并降低了利用率。传统基础设施无法提供足够的数据可见性来满足新的合规或控制要求。它是在云出现之前创建的,因此部署类似云的功能极具挑战性。
HCI dismantles silos and consolidates all assets into a single, easy-to-manage resource. The more "invisible" infrastructure there is, the greater, and HCI expands that invisibility to storage. With HCI, you may create a cluster with a range of nodes depending on your needs at the time—storage-heavy nodes whenever you need storage, CPU-heavy nodes whenever you need computation, and so on.
HCI拆除了孤岛,并将所有资产整合为一个易于管理的单一资源。基础设施越“隐形”,效果越好,而HCI将这种隐形性扩展到了存储领域。使用HCI,您可以根据当时的需求创建一个包含各种节点的集群——在需要存储时使用重存储节点,在需要计算时使用重CPU节点,以此类推。
551. The Golomb sequence is a non-decreasing integer sequence in which the n-th term equals the number of times the letter n appears in the sequence. The first few numbers are 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5,......
Golomb序列是一个非递减的整数序列,其中第n项等于数字n在序列中出现的次数。前几个数字是1、2、2、3、3、4、4、4、5、5、5、5、5、……
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0258d557c902bb67ab | 官方: 否 | 付费: 否
答案:
Definitions of a few terms: The third term is 2, and it's worth noting that three appears twice. The second term is 2, and it's worth noting that two appears twice. The fourth term is 3, and it's worth noting that the number three appears three times.
几个术语的定义:第三项是2,值得注意的是数字3出现了两次。第二项是2,值得注意的是数字2出现了两次。第四项是3,值得注意的是数字3出现了三次。
If n is a positive integer, solve for it. The goal is to discover the first n Golomb sequence terms.
如果n是正整数,请求解它。目标是找出Golomb序列的前n项。
To determine the nth term of a Golomb sequence, use the following recurrence relation: - a(1) = 1
要确定Golomb序列的第n项,请使用以下递推关系:- a(1) = 1
a(n + 1) = 1 + a(n + 1 – a(a(n)))
The following is the Dynamic Programming implementation:以下是动态规划实现:
void findGolomb(int N)
void findGolomb(int N)
{
int dp[N + 1];
int dp[N + 1];
// base case
// 基本情况
dp[1] = 1;
dp[1] = 1;
// Calculating and displaying the first
// 计算并显示Golomb序列的
// N terms of Golomb Sequence.
// 前N项。
for (int i = 1; i <= N; i++)
for (int i = 1; i <= N; i++)
{
dp[i] = 1 + dp[i - dp[dp[i - 1]]];
dp[i] = 1 + dp[i - dp[dp[i - 1]]];
cout << dp[i] << " ";
cout << dp[i] << " ";
}
}
Useful Interview Resources
有用的面试资源
- Free Mock Coding Interview
- Coding Interview Questions for Practice
- Technical Interview Questions for Practice
- Interview Preparation
552. Implement the Sieve of Eratosthenes in 0(n) time complexity.
在0(n)时间复杂度内实现埃拉托斯特尼筛法。
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Nutanix
- id: 69b37c0258d557c902bb67ae | 官方: 否 | 付费: 否
答案:
For any i where i ranges from 2 to N-1, examine the number to see if it is prime. If somehow the number is prime, it should be placed in the prime array. For each prime number j less than or equal to the lowest prime factor p of i, the following formula is used: - Make all i*p numbers non-prime.
对于i从2到N-1范围内的任意i,检查该数是否为素数。如果该数恰好是素数,则应将其放入素数数组。对于每个小于或等于i的最小素因子p的素数j,使用以下公式:- 将所有i*p的数字设为非素数。
Assign j to the lowest prime factor of i*p.
const long long MAX_CAP = 1000001;const long long MAX_CAP = 1000001;
// is_prime[] : is_prime[i] is true if the number i is prime
// is_prime[] : is_prime[i]为true表示数字i是素数
// prime[] : stores all the prime number less than N
// prime[] : 存储小于N的所有素数
// SPF[] : stores the smallest prime factor of a number
// SPF[] : 存储一个数的最小素因子
// [for Exp : smallest prime factor of '4' and '20'
// [例如:'4'和'20'的最小素因子
// is '2' so we put SPF[4] = 2 , SPF[20] = 2 ]
// 是'2',所以我们设SPF[4] = 2,SPF[20] = 2]
vectoris_prime (MAX_CAP , true);
vectoris_prime (MAX_CAP , true);
vectorprime;
vectorprime;
vectorsmallest_prime_factor (MAX_CAP);
vectorsmallest_prime_factor (MAX_CAP);
// function that generates all prime numbers less than N in O(n) time
// 以O(n)时间生成小于N的所有素数的函数
void Seive(int N)
void Seive(int N)
{
// 0 and 1 are not prime
// 0和1不是素数
is_prime[0] = is_prime[1] = false ;
is_prime[0] = is_prime[1] = false ;
// Fill the other entries
// 填充其余条目
for (long long int i = 2; i < N ; i++)
for (long long int i = 2; i < N ; i++)
{
// If is_prime[i] == true, then i is a
// 如果 is_prime[i] == true,则 i 是
// prime number
// 一个质数
if (is_prime[i] == true)
if (is_prime[i] == true)
{
// push i into the prime vector
// 将 i 推入质数向量
prime.push_back(i);
prime.push_back(i);
// A prime number itself is its own smallest
// 质数本身就是其最小的
// prime factor
// 质因数
smallest_prime_factor[i] = i;
smallest_prime_factor[i] = i;
}
// Remove all multiples of i*prime[k] which are
// 移除 i*prime[k] 的所有倍数,这些
// not prime by making is_prime[i*prime[j]] = false
// 不是质数,通过设置 is_prime[i*prime[j]] = false
// and set the smallest prime factor of i*prime[j] to prime[j]
// 并将 i*prime[j] 的最小质因数设置为 prime[j]
// this loop will run only once for the number which is not prime
// 这个循环仅对非质数运行一次
for (long long int k = 0;
for (long long int k = 0;
k < (int)prime.size() &&
k < (int)prime.size() &&
i*prime[k] < N && prime[k] <= smallest_prime_factor[i]; k++)
i*prime[k] < N && prime[k] <= smallest_prime_factor[i]; k++)
{
is_prime[i*prime[k]] = false;
is_prime[i*prime[k]] = false;
// put the smallest prime factor of i*prime[j]
// 将i*prime[j]的最小质因数存储起来
smallest_prime_factor[i*prime[k]] = prime[k];
smallest_prime_factor[i*prime[k]] = prime[k];
}
}
}
- Data Science
- All Events
- My Events
553. Find the order of characters in an alien language using a sorted dictionary (array of words).
使用排序字典(单词数组)找出外星语言中字符的顺序。
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0258d557c902bb67b1 | 官方: 否 | 付费: 否
答案:
Input: words[] = {"baa", "abcd", "abca", "cab", "cad"}
输入:words[] = {"baa", "abcd", "abca", "cab", "cad"}
Output: Order of characters is 'b', 'd', 'a', 'c'
输出:字符的顺序是 'b', 'd', 'a', 'c'
Because "baa" comes before "abcd" in the specified language, 'b' appears before 'a' in the result. Other orders can be found in the same way.
因为指定语言中“baa”在“abcd”之前,所以在结果中'b'出现在'a'之前。其他顺序可以以相同方式找到。
The goal is to make a character graph and then figure out how to order it topologically. The detailed steps are listed below. - Make a graph g with the number of vertices equal to the size of the alien language's alphabet. For example, if the alphabet has a size of 5, words can have up to 5 characters. There have been no edges in the graph at first.
目标是构建一个字符图,然后找出如何进行拓扑排序。详细步骤如下。 - 创建一个图g,其顶点数等于外星语言字母表的大小。例如,如果字母表大小为5,则单词最多可以有5个字符。起初图中没有边。
Carry out the steps below for each pair of adjacent strings in the sorted array.
Let word1 and word2 be the current pair of words. Compare the characters of both words one by one to locate the first mismatching character. Make an edge in g by mismatching a character in word1 with a character in word2. - Print topological ordering of the graph you just made.让word1和word2成为当前的一对单词。逐个比较两个单词的字符以找到第一个不匹配的字符。在g中通过将word1中的一个不匹配字符与word2中的一个字符连接起来创建一条边。 - 打印你所创建的图的拓扑排序。
// C++
// C++
include<bits/stdc++.h>
using namespace std;
using namespace std;
// Class for graph representation
// 用于图表示的类
class Graph
class Graph
{
int v;
int v;
list*adj;
list*adj;
// A function that is used by topologicalSort
// 由 topoologicalSort 使用的函数
void topologicalSortUtil(int v, bool visited[], stack&Stack);
void topologicalSortUtil(int v, bool visited[], stack&Stack);
public:
public:
Graph(int v); // Constructor
Graph(int v); // 构造函数
// function to add an edge to the graph
// 向图中添加边的函数
void addEdge(int v, int w);
void addEdge(int v, int w);
// displays a Topological Sort of the entire graph
// 显示整个图的拓扑排序
void topologicalSort();
void topologicalSort();
};
Graph::Graph(int v)
Graph::Graph(int v)
{
this->v = v;
this->v = v;
adj = new list[v];
adj = new list[v];
}
void Graph::addEdge(int v, int w)
void Graph::addEdge(int v, int w)
{
adj[v].push_back(w); // Adding w to the list of v.
adj[v].push_back(w); // 将w添加到v的邻接列表中。
}
void Graph::topologicalSortUtil(int v, bool isVisited[], stack
void Graph::topologicalSortUtil(int v, bool isVisited[], stack&S)
{
// Mark the current node to be visited.
// 将当前节点标记为已访问。
isVisited[v] = true;
isVisited[v] = true;
// Repeat for all vertices that are adjacent to this vertex.
// 对这个顶点的所有邻接顶点重复执行。
list::iterator i;
list::iterator i;
for (i = adj[v].begin(); i != adj[v].end(); ++i) {
for (i = adj[v].begin(); i != adj[v].end(); ++i) {
if (visited[*i] == false)
if (visited[*i] == false)
topologicalSortUtil(*i, isVisited, S);
topologicalSortUtil(*i, isVisited, S);
}
// Push the current vertex to the stack which stores the result
// 将当前顶点推入存储结果的栈中。
S.push(v);
S.push(v);
}
void Graph::topologicalSort()
void Graph::topologicalSort()
{
stackS;
stackS;
// Mark all the vertices as not visited
// 将所有顶点标记为未访问
bool *isVisited = new bool[v];
bool *isVisited = new bool[v];
for (int i = 0; i < v; i++)
for (int i = 0; i < v; i++)
isVisited[i] = false;
isVisited[i] = false;
// for (int i = 0; i < v; i++)
// for (int i = 0; i < v; i++)
if (isVisited[i] == false)
if (isVisited[i] == false)
topologicalSortUtil(i, isVisited, S);
topologicalSortUtil(i, isVisited, S);
// Print contents of stack
// 打印栈的内容
while (!S.empty())
while (!S.empty())
{
cout << (char) ('a' + S.top()) << " ";
cout << (char) ('a' + S.top()) << " ";
S.pop();
S.pop();
}
}
int min(int a, int b)
int min(int a, int b)
{
return (a < b)? a : b;
return (a < b)? a : b;
}
// This function finds and displays the order of characters from a sorted
// 此函数从排序后的单词数组中发现并显示字符顺序。N是words[]的大小。‘a’是所有可能字母的集合。
// array of words. N is the size of words[]. ‘a’ is set of all possible
// 数组中的单词。N是words[]的大小。‘a’是所有可能字母的集合。
// alphabets.
// 字母表。
void print(string words[], int N, int a)
void print(string words[], int N, int a)
{
// Make a graph with 'a' edges
// 创建一个具有'a'条边的图
Graph g(a);
Graph g(a);
// Process all the adjacent pairs of words and make a graph
// 处理所有相邻单词对并构建图
for (int i = 0; i < N-1; i++)
for (int i = 0; i < N-1; i++)
{
// Take the two current words and wait for the first mismatching
// 取当前两个单词并等待第一个不匹配的
// character
// 字符
string s1 = words[i], s2 = words[i+1];
string s1 = words[i], s2 = words[i+1];
for (int k = 0; k < min(word1.length(), word2.length()); k++)
for (int k = 0; k < min(word1.length(), word2.length()); k++)
{
// If we encounter a mismatching character, we add an edge
// 如果遇到不匹配字符,我们添加一条边
// from the character of s1 to that of s2
// 从 s1 的字符指向 s2 的字符
if (s1[k] != s2[k])
if (s1[k] != s2[k])
{
g.addEdge(s1[k]-'a', s2[k]-'a');
g.addEdge(s1[k]-'a', s2[k]-'a');
break;
break;
}
}
}
// Print the topological sort of the above graph
// 打印上述图的拓扑排序
g.topologicalSort();
g.topologicalSort();
}
// print function to be called in the main function
// 在主函数中调用的打印函数
554. Given an n-element array with elements ranging from 0 to n-1, any of these integers can occur whatever number of times. Using just constant memory space, find those repeating numbers in O(n).
给定一个 n 元素数组,元素范围为 0 到 n-1,这些整数中的任何一个都可以出现任意次数。仅使用常数内存空间,在 O(n) 时间内找出这些重复的数字。
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0258d557c902bb67b4 | 官方: 否 | 付费: 否
答案:
The array's numbers vary from zero to n-1, and also the input array is n bytes long. As a result, the input array could be transformed into a HashMap. If an element 'a' is discovered while navigating the array, raise the value of a%nth element by n. By dividing the a%nth element by n, you can get the frequency.
数组中的数字范围从 0 到 n-1,且输入数组长度为 n 字节。因此,输入数组可以转换为 HashMap。如果在遍历数组时发现一个元素 'a',则将 a%n 个元素的值增加 n。通过将 a%n 个元素除以 n,可以得到频率。
// C++
// C++
void findDupEle (int num[], int n)
void findDupEle (int num[], int n)
{
for (int i = 0; i < n; i++) {
for (int i = 0; i < n; i++) {
num[num[i] % n] = num[num[i] % n] + n;
num[num[i] % n] = num[num[i] % n] + n;
}
cout << "The duplicate elements are : " << endl;
cout << "重复的元素是:" << endl;
for (int i = 0; i < n; i++) {
for (int i = 0; i < n; i++) {
if (num[i] >= n * 2) {
if (num[i] >= n * 2) {
cout << i << " " << endl;
cout << i << " " << endl;
}
}
return;
return;
}
- Time Complexity: O(n) as only two traversals are required.
- Space Complexity: O(1) because no more space is required. Thus, the space complexity remains constant.
555. Multiply two numbers using bitwise operators.
使用位运算符将两个数字相乘。
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0258d557c902bb67ba | 官方: 否 | 付费: 否
答案:
The Russian peasant algorithm is an intriguing method. The goal is to keep doubling the first number while halving the second until the second number never becomes 1. Then add the first number to the result anytime the second number becomes odd during the operation (result is initialised as 0).
俄罗斯农民算法是一种引人入胜的方法。其目标是不断将第一个数字加倍,同时将第二个数字减半,直到第二个数字不再变成1。然后,在操作过程中,每当第二个数字变为奇数时,就将第一个数字加到结果中(结果初始化为0)。
// C++
// C++
unsigned int multiply(unsigned int x, unsigned int y)
unsigned int multiply(unsigned int x, unsigned int y)
{
int ans = 0; // initialise the ans variable
int ans = 0; // 初始化ans变量
// While the second number is not equal to 1
// 当第二个数字不等于1时
while (y > 0)
while (y > 0)
{
// If second number is odd, we will add the first number to ans
// 如果第二个数字是奇数,我们将第一个数字加到ans中
if (y & 1)
if (y & 1)
ans = ans + x;
ans = ans + x;
// then multiply the first number by 2 and divide the second number by 2
// 然后将第一个数字乘以2,并将第二个数字除以2
x = x << 1;
x = x << 1;
y = y >> 1;
y = y >> 1;
}
return ans;
return ans;
}
- Time Complexity: O(log2y)
- Auxiliary Space: O(1)
If y is even, the value of xy is (x2)(y/2); otherwise, the value is ((x2)*(y/2) + x. We keep multiplying 'x' by 2 and dividing 'y' by 2 in the while loop. We add 'x' to 'ans' if 'y' is odd in the loop. The answer is obtained when the value of 'y' equals 1, and the value of 'ans' + 'x' equals 1. When 'y' is a power of two, the 'ans' remains 0 and the multiplication is done by 'x'.
如果y是偶数,则xy的值是(x2)(y/2);否则,值是((x2)*(y/2) + x。我们在while循环中持续将'x'乘以2并将'y'除以2。如果在循环中'y'为奇数,我们将'x'加到'ans'上。当'y'的值等于1时,答案得到,且'ans' + 'x'的值等于1。当'y'是2的幂时,'ans'保持为0,乘法通过'x'完成。
556. What is the advantage of a ternary search tree over trie?
三叉搜索树相比字典树的优势是什么?
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0258d557c902bb67bd | 官方: 否 | 付费: 否
答案:
In contrast to the trie(standard) data structure, which has 26 pointers for its offspring, every node in a ternary search tree only has three: - The left pointer is pointing to the node whose value is lower than the current node's value.
与标准的字典树数据结构(每个节点有26个指针指向其子节点)不同,三叉搜索树中的每个节点只有三个指针:- 左指针指向值小于当前节点值的节点。
- The equal pointer leads to a node whose value is the same as the current node's value.
The right pointer leads to the node whose value exceeds the current node's value.
Aside from the three-pointers mentioned above, every node has a field for indicating data (character in the case of a dictionary) and a field for indicating the end of a string.除了上述三个指针外,每个节点还有一个字段用于指示数据(在字典情况下是字符)和一个字段用于指示字符串是否结束。
One advantage of employing ternary search trees over attempts is that ternary search trees take up less space (only three-pointers each node in comparison to 26 in standard tries). In addition, ternary search trees can be utilised in any situation where a hashtable is used to hold strings. Tries are appropriate whenever there is a balanced mix of words throughout the alphabets, allowing for the most efficient use of space. Aside from that, ternary search trees are preferable. Whenever the strings to be maintained all have the same prefix, ternary search trees are the most economical (in terms of space).
使用三叉搜索树而非字典树的优势之一是三叉搜索树占用更少的空间(每个节点只有三个指针,而标准字典树有26个)。此外,三叉搜索树可以用于任何使用哈希表存储字符串的场景。当字母表中的单词分布均衡时,字典树是合适的,这样能最有效地利用空间。除此之外,三叉搜索树更优。当需要维护的字符串都有相同前缀时,三叉搜索树最经济(就空间而言)。
557. Discuss OutOfMemoryError Exception in Java.
讨论 Java 中的 OutOfMemoryError 异常。
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0258d557c902bb67cc | 官方: 否 | 付费: 否
答案:
OutOfMemoryError exception is usually thrown whenever the Java Virtual Machine runs out of memory and cannot allocate an object. The trash collector was unable to release any more memory. OutOfMemoryError frequently indicates that you're doing something incorrectly, such as holding on to objects for too long or processing too much data at once. It can also suggest an out-of-control issue, as in a third-party library that caches strings or perhaps an application server that doesn't clear up after deployments. And it doesn't always have anything to do with the items on the heap. When a native allocation cannot be satisfied, the java.lang.OutOfMemoryError exception can be thrown by native library code (for example, if swap space is low). Let's look at some of the scenarios in which the OutOfMemory issue can occur. - Java heap space: This problem is caused by applications that utilise too many finalizers. If a class does have a finish method, trash collection does not reclaim space for objects of that kind. Instead, the objects get queued for finalisation, which happens later after garbage collection.
当 Java 虚拟机内存耗尽且无法分配对象时,通常会抛出 OutOfMemoryError 异常。垃圾收集器无法释放更多内存。OutOfMemoryError 通常表明你正在做某些错误操作,例如持有对象时间过长或一次处理的数据过多。它也可能暗示失控的问题,例如第三方库缓存字符串,或者应用程序服务器在部署后未清理。并且它不一定与堆上的项有关。当无法满足本机分配时,java.lang.OutOfMemoryError 异常可能由本机库代码抛出(例如,如果交换空间不足)。让我们看看 OutOfMemory 问题可能发生的一些场景。- Java 堆空间:此问题由使用过多终结器的应用程序引起。如果类有 finish 方法,垃圾收集不会为这类对象回收空间。相反,对象会被排队等待终结,这发生在垃圾收集之后。
- GC Overhead limit surpassed: This error means that the garbage collector is constantly operating and that the Java application is progressing very slowly. A java.lang.OutOfMemoryError is thrown after a garbage collection if the Java process spends more than approximately 98 per cent of its time doing garbage collection and recovers less than 2% of the heap and has done so far the last 5 (compile-time constant) subsequent garbage collections.
- Metaspace: Metadata for Java classes is stored in native memory. Assume that the metaspace for class metadata has been depleted, as in java.lang. The exception OutOfMemoryError with a detail MetaSpace is thrown. A java.lang.OutOfMemory Exception is thrown when the amount of native memory required for class metadata surpasses MaxMetaSpaceSize. The exception OutOfMemoryError with a detail MetaSpace is thrown.
- Requested array size exceeds VM limit: This phrase implies that the application tried to allocate an array that was larger than the heap capacity.
- Permgen space is thrown: The PermGen space error means that the memory space allocated to the Permanent Generation has been used up.
- Out of swap space: This apparent exception happens when a native heap allocation fails and the native heap is nearing exhaustion. Operating-system-level faults are frequently the cause of the java.lang.OutOfMemoryError: Out of Swap Space error.
- reason stack_trace_with_native_method: When this error message (reason stack trace with the native method) is thrown, a stack trace with a native method as the top frame is printed. This indicates that a native method has experienced an allocation failure.
558. Explain the reference counting mechanism in context to Garbage Collection.
解释垃圾收集中的引用计数机制。
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0258d557c902bb67cf | 官方: 否 | 付费: 否
答案:
From the beginning, the reference counting mechanism has been a very old Garbage Collection technique. Each object in the reference counting approach has a track of the number of pointers to it from various objects and the stack. When a new item refers to it, the counter is increased by one. When an object's reference is lost, the counter is decremented by one. When the count hits '0,' the garbage collector can de-allocate the object.
从一开始,引用计数机制就是一种非常古老的垃圾收集技术。在引用计数方法中,每个对象都跟踪来自不同对象和栈的指向它的指针数。当新项引用它时,计数器加一。当对象的引用丢失时,计数器减一。当计数达到“0”时,垃圾收集器可以释放该对象。
When allocating to a new object, the main advantage of the reference counting approach has been the low amount of work per memory write. However, it has serious difficulty with data cycles. When the first object is referred to by the second object, and the second object is referred to by the first (cyclic references), the count never reaches 0, and the objects are never garbage collected.
在分配新对象时,引用计数方法的主要优势是每次内存写入的工作量较低。然而,它在数据循环方面存在严重困难。当第一对象被第二对象引用,且第二对象被第一对象引用(循环引用)时,计数永远不会达到0,对象永远不会被垃圾收集。
559. What are the different types of virtualization?
虚拟化有哪些不同类型?
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0258d557c902bb67d5 | 官方: 否 | 付费: 否
答案:
The different types of virtualization are:
虚拟化的不同类型有:
- Data virtualization: Data from various sources can be combined into a single source. Data virtualization enables businesses to approach data as a dynamic resource, allowing them to combine data from many sources, readily adapt new data sources, and change data to meet user requirements. Data virtualization tools sit in front of numerous data sources and allow them to be regarded as a single source, giving the right data to the right application or user at the right time.
- Server virtualization: Servers are computers that are designed to efficiently handle a large number of specified tasks so that other computers, such as laptops and desktops, can perform a range of other functions. Virtualizing a server allows it to perform more of those specific activities while also allowing the components to be used for different purposes.
- Application virtualization: Application virtualization allows a user to access a server-based application from a remote location. The server keeps all of the application's personal data and other characteristics, yet it can still be run on a local workstation over the internet. A user who has to run two separate versions of the same software is an example of this. Hosted apps and packaged applications are examples of technologies that leverage application virtualization.
- Desktop virtualization: Desktop virtualization, which is easily confused with operating system virtualization, which allows you to install multiple operating systems on a single machine, allows a central administrator (or automated administration tool) to deploy simulated desktop environments to hundreds of physical machines at the same time. Unlike traditional desktop environments, which need each computer to be physically installed, configured, and updated, desktop virtualization enables administrators to do mass configurations, updates, and security checks across all virtual desktops.
- Network virtualization: The capacity to manage several virtual networks, each with its own data and management plan. It coexists on top of a single physical network. It can be handled by individuals who may or may not be aware of each other's identities. Within days or even weeks, network virtualization allows you to construct and provision virtual networks, including logical switches, routers, firewalls, load balancers, VPNs, and workload security. Virtualizing networks minimises the number of physical components needed to build several, independent networks, such as switches, routers, servers, cables, and hubs, and it's very popular in the telecommunications business.
- Storage virtualization: Storage virtualization abstracts resources such that several physical storage arrays appear to be a single storage pool with direct and independent access. Storage virtualization software gathers and maintains storage across several storage arrays, then serves it to applications as needed. The use of centralised virtual storage improves resource flexibility and availability. From a central console, this data virtualization and centralization may be simply managed. Users can manage and access numerous arrays as if they were a single storage unit.
560. What do you understand by the term “virtualization”? What are its benefits?
你如何理解“虚拟化”这个术语?它有什么好处?
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0258d557c902bb67d8 | 官方: 否 | 付费: 否
答案:
The procedure of running a virtual instance of a computer system in a layer separate from the actual hardware is known as virtualization. It usually refers to running multiple operating systems on the same computer at the same time. It may appear to applications running on top of the virtualized machine that they are on their own dedicated computer, with their own operating system, libraries, and other programmes that are unrelated to the host operating system that sits underneath it. Hypervisor software separates physical resources from virtual environments or the entities that use those resources. Hypervisors can run on top of an operating system (like on a laptop) or be installed directly on the hardware (as on a server), as most businesses do. Hypervisors divide up your physical resources so that virtual environments can access them.
在与实际硬件分离的层中运行计算机系统的虚拟实例的过程被称为虚拟化。它通常指在同一台计算机上同时运行多个操作系统。对于运行在虚拟化机器之上的应用程序来说,它们可能看起来是在自己的专用计算机上,带有自己的操作系统、库以及其他与底层宿主操作系统无关的程序。虚拟机监控程序软件将物理资源与虚拟环境或使用这些资源的实体分开。虚拟机监控程序可以在操作系统之上运行(如笔记本电脑上),也可以直接安装在硬件上(如服务器上),如大多数企业所做。虚拟机监控程序划分物理资源,以便虚拟环境可以访问它们。
From the real environment to the multiple virtual environments, resources are partitioned as needed. Within the virtual environment, users interact with it and execute computations (typically called a guest machine or virtual machine). The virtual machine is a single data file that runs. And, like any other digital file, it can be transferred from one computer to another, opened in either, and expected to function correctly. When a user or program issues an instruction that requires additional resources from the physical environment while the virtual environment is running, the hypervisor relays the request to the physical system and caches the changes—all at near-native speed (especially if the request is sent through an open-source hypervisor based on KVM).
从真实环境到多个虚拟环境,资源按需分区。在虚拟环境内,用户与之交互并执行计算(通常称为客户机或虚拟机)。虚拟机是一个运行的数据文件。并且,像任何其他数字文件一样,可以从一台计算机传输到另一台计算机,在两者中打开,并预期正常工作。当用户或程序在虚拟环境运行时发出需要物理环境额外资源的指令时,虚拟机监控程序将请求转发到物理系统并缓存更改——以接近本机速度(特别是如果请求通过基于 KVM 的开源虚拟机监控程序发送)。
Benefits of virtualization: - Resource allocation is more flexible and efficient.
虚拟化的好处:- 资源分配更灵活高效。
- Increase the efficiency of development.
- It lowers IT infrastructure costs.
- Remote access and fast scalability.
- Disaster recovery and high availability.
- Allows for the use of multiple operating systems.
- Management of data centres.
- Reduces downtime to a minimum.
- Provisioning procedure is sped up.
- Improved responsiveness and resource availability.
561. Define encapsulation in context to OOPS.
在面向对象编程中定义封装。
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0258d557c902bb67db | 官方: 否 | 付费: 否
答案:
The concept of encapsulation (or OOP Encapsulation) in object-oriented computer programming (OOP) languages refers to the bundling of data and the functions that operate on that data into a single unit. Encapsulation is commonly used in the form of classes in several programming languages. A class is a type of program-code template that allows programmers to design objects with both variables (data) and behaviours (functions or methods). In computer science, a class is an example of encapsulation since it consists of data and procedures that have been bundled into a single unit.
在面向对象计算机编程(OOP)语言中,封装(或OOP封装)的概念是指将数据以及操作这些数据的函数捆绑到单个单元中。封装在多种编程语言中通常以类的形式使用。类是一种程序代码模板类型,允许程序员设计具有变量(数据)和行为(函数或方法)的对象。在计算机科学中,类是封装的一个示例,因为它包含已捆绑到单个单元中的数据及程序。
Encapsulation can also refer to a mechanism that prevents users from directly accessing specific components of an object, such as state values for all of the object's variables. Data members as well as data functions or methods linked with an instantiated class or object can be hidden via encapsulation.
封装也可以指一种机制,用于防止用户直接访问对象的特定组件,例如对象所有变量的状态值。与实例化类或对象关联的数据成员以及数据函数或方法可以通过封装进行隐藏。
There are a few fundamental advantages of encapsulation in programming. These are some of them: - Data hiding: Users will have no notion how classes are built or stored because data will be hidden. Users will only be aware of the fact that values are being given and initialised.
编程中封装有几个基本优势。以下是一些:- 数据隐藏:由于数据将被隐藏,用户将无法了解类是如何构建或存储的。用户只会知道值正在被提供和初始化这一事实。
- Easy to Adjust and Adapt to New Requirements: Encapsulation makes it simple to change and adapt to new requirements.
- More flexibility: You can choose whether to make variables red or write-only. SetName(), setAge(), and setWriteOnly() are some examples. To make variables write-only, simply omit the get methods like getName(), getAge(), and so on.
562. Define OSI Model and its seven layers.
定义OSI模型及其七层。
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0258d557c902bb67de | 官方: 否 | 付费: 否
答案:
The Open Systems Interconnection Model (OSI Model) is a theoretical framework for describing the functions of a networking system. In order to facilitate interoperability between diverse devices and applications, the OSI model describes computing functions into a universal set of rules and standards. The connections between computing systems are divided into seven abstraction levels in the OSI reference model: Physical, Data Link, Network, Transport, Session, Presentation, and Application.
开放系统互连模型(OSI模型)是一个用于描述网络系统功能的理论框架。为了促进不同设备和应用之间的互操作性,OSI模型将计算功能划分为一套通用的规则和标准。在OSI参考模型中,计算系统之间的连接被分为七个抽象级别:物理层、数据链路层、网络层、传输层、会话层、表示层和应用层。
The International Organisation for Standardisation (ISO) developed the OSI model in 1984, and it is now used as an architectural paradigm for inter-computer communications. It is a reference model that specifies how information from one computer's software application passes through physical media to another computer's software application.
国际标准化组织(ISO)于1984年开发了OSI模型,现在它被用作计算机间通信的架构范式。它是一个参考模型,规定了信息如何从一台计算机的软件应用程序通过物理介质传递到另一台计算机的软件应用程序。
The seven layers of the OSI Model are
OSI模型的七层是
- Physical layer( Layer 1): The physical layer is the lowest layer in the OSI reference model. It is in charge of establishing a physical connection between the devices. Bits of information are stored in the physical layer. It is in charge of sending individual bits from one node to another. When this layer receives data, it converts the signal received into 0s and 1s and sends them to the Data Link layer, which reassembles the frame.
- Datalink layer( Layer 2 ): Data packets are encoded and decoded into bits at OSI Model Layer 2, or the data connection layer. It provides knowledge and management of transmission protocols, as well as handling failures in the physical layer, flow control, and frame synchronisation.The media access control (MAC) layer and the logical link control (LLC) layer are two sublayers of the data link layer. The MAC sublayer governs how a networked computer receives access to data and permission to transfer it. Frame synchronisation, flow management, and error checking are all handled by the LLC layer.
- Network Layer( Layer 3 ): The network layer is responsible for data transmission between hosts that are connected to various networks. It also handles packet routing, which is the choosing of the shortest path to send a packet from a large number of options. The network layer places the IP addresses of the sender and receiver in the header.
- Transport layer( Layer 4 ): The transport layer, or OSI Model Layer 4, is responsible for end-to-end error detection and recovery, as well as flow control, and offers transparent data transfer between end systems, or hosts. It assures complete data transfer, which is achieved by the TCP or transport layer protocol, which handles data as a stream of bytes.
- Session layer ( Layer 5 ): The session layer is in charge of coordinating conversations between computers. At layer 5, a session or connection between machines is established, managed, and terminated. Authentication and reconnections are also part of the session layer services.
- Presentation layer( Layer 6 ): Based on the syntax or semantics that the application accepts, the presentation layer formats or converts data for the application layer. As a result, it's sometimes referred to as the syntactic layer. This layer can also handle the application layer's encryption and decryption needs.
- Application layer ( Layer 7 ): Both the end-user and the application layer interact with the software application directly at this tier. End-user programmes, such as a web browser or Office 365, receive network services through this layer. The application layer locates communication partners, determines resource availability, and coordinates communication. This layer supports file transfer, email, and other network software services as application services. Telnet and FTP are examples of applications that only exist at the application level. This layer includes tiered application architectures.
563. What is the difference between a MAC address and an IP address?
MAC地址和IP地址有什么区别?
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0258d557c902bb67e1 | 官方: 否 | 付费: 否
答案:
Some of the key differences between a MAC address and an IP address are: - A MAC address is a one-of-a-kind hardware identification number assigned to a NIC (Network Interface Controller/Card), whereas an IP address is a number that helps you identify a network connection.
MAC地址和IP地址之间的一些关键区别如下:- MAC地址是分配给NIC(网络接口控制器/卡)的独一无二的硬件识别号,而IP地址是帮助识别网络连接的号码。
- The manufacturer of the hardware interface assigns the MAC address, but the network administrator or Internet Service Provider assigns the IP address (ISP).
- The Mac address identifies the device, while the IP address indicates how it connects to the network.
- IP addresses, on the other hand, can be used for broadcasting or multicasting, whereas MAC addresses can be only used for broadcasting.
The Data-Link layer of the OSI or TCP/IP reference model implements the MAC address. On the TCP/IP or OSI model, the IP address is implemented in the Network layer.
Nutanix Interview Preparation
564. What does Nutanix do?
Nutanix做什么?
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0358d557c902bb6825 | 官方: 否 | 付费: 否
答案:
Nutanix provides invisible infrastructure for next-generation enterprise computing, allowing IT to focus on the applications and services that drive the company forward. The Nutanix Cloud Platform includes hybrid cloud architecture, multi-cloud management, unified storage, database services, and desktop services to serve any application and workload, anywhere. Nutanix naturally converges computation, virtualization, and storage into a single solution. Customers may expect predictable performance, linear scalability, and cloud-like infrastructure utilisation when they use Nutanix. Nutanix combines the public cloud's ease and agility with the private cloud's performance, security, and management.
Nutanix为下一代企业计算提供隐形基础设施,使IT能够专注于推动公司前进的应用程序和服务。Nutanix云平台包括混合云架构、多云管理、统一存储、数据库服务和桌面服务,以在任何地方服务任何应用程序和工作负载。Nutanix自然地将计算、虚拟化和存储融合到单一解决方案中。使用Nutanix后,客户可以期待可预测的性能、线性扩展性和类似云的基础设施利用率。Nutanix结合了公共云的简单性和敏捷性以及私有云的性能、安全性和管理性。
565. What is the salary of a software engineer at Nutanix?
Nutanix软件工程师的薪资是多少?
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0358d557c902bb682b | 官方: 否 | 付费: 否
答案:
The average salary of a software engineer at Nutanix may range from 15 lakhs to 20 lakhs per annum in India.
Nutanix软件工程师在印度的平均薪资可能在每年15万到20万卢比之间。
566. Why do you want to join Nutanix?
你为什么想加入Nutanix?
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0358d557c902bb682e | 官方: 否 | 付费: 否
答案:
The opportunity at Nutanix is enormous, both in terms of market opportunity and in terms of having the power to influence the creation of a partner ecosystem from the bottom up that offers high value to all of its stakeholders. The potential to create this environment will provide us with unrivalled loyalty. Nutanix uses genuinely integrated infrastructure to tackle customer concerns in virtualized settings. A compelling Converged Infrastructure solution that eliminates the need for numerous registrations from a legacy storage vendor and a legacy server vendor is a statement that will connect with our partners.
Nutanix的机会巨大,无论是在市场机会方面还是在拥有从底层创建合作伙伴生态系统的能力方面,该生态系统为其所有利益相关者提供高价值。创造这种环境的潜力将为我们带来无与伦比的忠诚度。Nutanix使用真正集成的基础设施来解决虚拟化环境中的客户问题。一个引人注目的融合基础设施解决方案,消除了从传统存储供应商和传统服务器供应商进行多次注册的需求,是一个能与我们的合作伙伴产生共鸣的声明。
With a sales force that has been in existence for less than two years, the Nutanix team has indeed created an extraordinary buzz in the marketplace. It will be a tremendous trip to be a part of if we can organise our strategy and harness it around developing a world-class channel programme.
凭借存在不到两年的销售团队,Nutanix团队确实在市场上制造了非凡的热潮。如果我们能够组织策略并围绕开发世界级渠道计划加以利用,这将是一段激动人心的旅程。
567. How do I get an internship with Nutanix?
我怎样才能在Nutanix获得实习机会?
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0358d557c902bb6831 | 官方: 否 | 付费: 否
答案:
Nutanix internship programme is designed to give you hands-on exposure to the team and culture while allowing you to create, develop, and demonstrate your abilities. By the end of August, Nutanix starts accepting applications for the following summer. Qualified candidates will then be invited to a series of phone or video interviews, as well as a small assignment. While this is the standard timeline, you are free to apply for opportunities that interest you at any moment.
Nutanix实习项目旨在让你亲身体验团队和文化,同时让你能够创造、发展和展示你的能力。到八月底,Nutanix开始接受次年夏季的申请。符合条件的候选人随后将被邀请参加一系列电话或视频面试,以及一项小任务。虽然这是标准的时间安排,但你随时可以自由申请感兴趣的机会。
568. How do you get selected on Nutanix?
你是如何在Nutanix被选中的?
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0358d557c902bb6834 | 官方: 否 | 付费: 否
答案:
Nutanix recruits in a series of around 4-5 rounds of interviews. The process consists mostly of two written rounds (coding and debugging rounds), followed by two to three interviews( technical and hr rounds). When it comes to shortlisting individuals, the organisation focuses a strong emphasis on creativity and creative abilities.
Nutanix通过大约4-5轮面试进行招聘。流程主要包括两轮笔试(编码和调试轮),随后是两到三轮面试(技术和人力资源轮)。在筛选候选人时,组织高度重视创造力和创新能力。
569. How is it working at Nutanix?
在Nutanix工作怎么样?
- 知识点: 其他/未分类 (标签: interviewbit, nutanix, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nutanix
- id: 69b37c0358d557c902bb6837 | 官方: 否 | 付费: 否
答案:
Employee satisfaction is just as essential to Nutanix as customer satisfaction. Nutanix promotes a culture of learning, growth, and success. Nutanix supports the health and wellbeing of the people who make the company successful by providing exceptional benefits and the power of choice making a positive difference in their lives.
员工满意度对Nutanix来说与客户满意度同等重要。Nutanix倡导学习、成长和成功的文化。Nutanix通过提供卓越的福利和选择权来支持那些使公司成功的人们的健康和福祉,从而对他们的生活产生积极影响。
570. What is the need of tree shaking?
什么是树摇动的必要性?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6aba | 官方: 否 | 付费: 否
答案:
In every application, tree shaking may dramatically reduce code size. In other words, the less code we transmit over the wire, the more performant the programme. For example, if we only want to develop a "Hello World" application utilising SPA frameworks, it will take a few MBs, but tree shaking can reduce the size to a few hundred KBs. Tree shaking is supported by the Rollup and Webpack bundlers.
在每个应用程序中,树摇动可能显著减少代码大小。换句话说,我们在网络上传输的代码越少,程序性能就越好。例如,如果我们只想使用SPA框架开发一个“Hello World”应用程序,它可能需要几MB,但树摇动可以将大小减少到几百KB。Rollup和Webpack打包器支持树摇动。
571. What's the distinction between native, host, and user objects?
原生对象、宿主对象和用户对象之间有什么区别?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6abd | 官方: 否 | 付费: 否
答案:
Native objects are objects that are described by the ECMAScript standard as being part of the JavaScript language. String, Math, RegExp, Object, Function, and other ECMAScript basic objects are examples. Host objects are those made available by the browser or runtime environment (Node). Host objects include windows, XmlHttpRequest, DOM nodes, and so on. User objects are objects that have been defined in the javascript code. User objects, for example, are built for profile information.
原生对象是 ECMAScript 标准描述为 JavaScript 语言一部分的对象。String、Math、RegExp、Object、Function 以及其他 ECMAScript 基础对象都是示例。宿主对象是由浏览器或运行时环境(Node)提供的对象。宿主对象包括 window、XmlHttpRequest、DOM 节点等。用户对象是在 javascript 代码中定义的对象。例如,用户对象是为档案信息而构建的。
572. Determine whether two strings, s and t, are isomorphic. If the characters in s can be changed to produce t, two strings s and t are isomorphic.
确定两个字符串 s 和 t 是否同构。如果 s 中的字符可以被更改以产生 t,则两个字符串 s 和 t 是同构的。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6ac3 | 官方: 否 | 付费: 否
答案:
All instances of a character must be replaced with another character while maintaining the character's order. A character cannot map to another character, but it may map to itself.
字符的所有实例必须被替换为另一个字符,同时保持字符的顺序。一个字符不能映射到另一个字符,但它可以映射到自身。
Example 1: - Input: s = "egg", t = "add"
示例 1:- 输入:s = "egg", t = "add"
Output: true
Example 2: - Input: s = "foo", t = "bar"示例 2:- 输入:s = "foo", t = "bar"
Output: false
Example 3: - Input: s = "paper", t = "title"示例 3:- 输入:s = "paper", t = "title"
Output: true
The goal is to map each character in s to the corresponding character in t, unless the character has previously appeared, in which case we check to see if it mapped to the same value as the current character, and return false if it didn't. Also, two characters in t may not map to the same character in s, which is why we keep track of all the characters that have appeared in t in their own set, and verify that the character hasn't yet appeared if its corresponding character in s hasn't as well.目标是映射 s 中的每个字符到 t 中对应的字符,除非该字符之前出现过,在这种情况下,我们检查它是否映射到了与当前字符相同的值,如果没有则返回 false。另外,t 中的两个字符不能映射到 s 中的同一个字符,这就是为什么我们在自己的集合中跟踪 t 中出现的所有字符,并验证如果 s 中的对应字符尚未出现,则该字符也尚未出现。
class Solution {
class Solution {
public:
public:
bool isIsomorphic(string s, string t) {
bool isIsomorphic(string s, string t) {
if (s.size() != t.size())
if (s.size() != t.size())
return false;
返回 false;
unordered_map<char, char> hash;
unordered_map<char, char> hash;
unordered_settChars;
unordered_settChars;
for (int i = 0; i < s.size(); ++i)
for (int i = 0; i < s.size(); ++i)
{
if (hash.count(s[i]))
if (hash.count(s[i]))
{
if (hash[s[i]] != t[i])
if (hash[s[i]] != t[i])
return false;
返回 false;
}
else
else
{
if (tChars.count(t[i]))
if (tChars.count(t[i]))
return false;
返回 false;
hash[s[i]] = t[i];
hash[s[i]] = t[i];
tChars.insert(t[i]);
tChars.insert(t[i]);
}
}
return true;
返回 true;
}
};
573. Return true if the number n is a power of two. Return false otherwise. If there exists an integer x such that n == 2x, then n is a power of two.
如果数字 n 是 2 的幂则返回 true,否则返回 false。如果存在整数 x 使得 n == 2x,则 n 是 2 的幂。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6ac6 | 官方: 否 | 付费: 否
答案:
Example 1: - Input: n = 1
示例 1:- 输入:n = 1
- Output: true
Explanation: 20 = 1
Example 2: - Input: n = 16示例 2:- 输入:n = 16
- Output: true
Explanation: 24 = 16
Example 3: - Input: n = 3示例 3:- 输入:n = 3
Output: false
If n is a negative integer or zero, the function returns false (self-explanatory). All powers of two have only one bit set in their binary form, for example, 2 -> 1 0, 16 -> 1 0 0 0 0. So we use the (__builtin popcount()) method, which returns the number of set bits (1) and if it equals 1 then the number is a power of two, else it is not.如果 n 是负整数或零,函数返回 false(无需解释)。所有 2 的幂在其二进制形式中仅有一位为 1,例如,2 -> 1 0,16 -> 1 0 0 0 0。因此我们使用(__builtin popcount())方法,它返回置位(1)的数量,如果等于 1 则该数是 2 的幂,否则不是。
class Solution {
class Solution {
public:
public:
bool isPowerOfTwo(int n) {
bool isPowerOfTwo(int n) {
if(n<1) return false;
如果 n<1 则返回 false;
else if(__builtin_popcount(n)==1) return true;
否则如果 __builtin_popcount(n)==1 则返回 true;
else return false;
else return false;
}
};
574. You are provided a unique integer array nums that is sorted. A range [a,b] is the collection of all integers between a and b. (inclusive). Return the shortest sorted list of ranges that exactly cover all of the integers in the array.
给你一个排序的唯一整数数组 nums。范围 [a,b] 是 a 和 b 之间所有整数的集合(含端点)。返回能精确覆盖数组中所有整数的最短排序范围列表。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6ac9 | 官方: 否 | 付费: 否
答案:
That is, each element of nums is covered by precisely one of the ranges, and no integer x exists in which x is in one of the ranges but not in nums.
也就是说,nums 的每个元素恰好被一个范围覆盖,并且不存在整数 x 使得 x 在某个范围内但不在 nums 中。
Example 1: - Input: nums = [0,1,2,4,5,7]
示例 1:- 输入:nums = [0,1,2,4,5,7]
- Output: ["0->2", "4->5", "7"]
Explanation: The ranges are:[0,2] --> "0->2"[4,5] --> "4->5"[7,7] --> "7"
Example 2: - Input: nums = [0,2,3,4,6,8,9]示例 2:- 输入:nums = [0,2,3,4,6,8,9]
- Output: ["0", "2->4", "6", "8->9"]
Explanation: The ranges are:[0,0] --> "0"[2,4] --> "2->4"[6,6] --> "6"[8,9] --> "8->9"
We are provided with unique integer array nums that are sorted.我们得到的是排序的唯一整数数组 nums。
We must produce the lowest list of ranges that exactly cover all of the numbers in the array. nums = [0,1,2,4,5,7] as input ["0->2", "4->5", "7"] as output So, for the first iteration, our for loop will iterate from 0 to n (n being the vector size) and assign a = nums[i]. Now, for the first iteration, I = 0, we are looking for a condition that says if our I == n-1 or nums[i] + 1!= nums[i+1]. As a result, for the first repetition, 0!= 5 or 1!= 1 ( none of them is true) False condition. In the second iteration, I = 1; 1!= 5 or 2!= 2. (none of them is true) False condition, In the third iteration, I = 2; 2!= 5 or 3!= 4. (both are true) True Condition. So it will now execute under the For Loop for the first time. Now, if the condition in the for loop specifies that 2!= 0, we will push a -> nums[i] in the result; You are provided with a unique integer array of nums that are sorted. A range [a,b] is the collection of all integers between a and b. (inclusive). Return the shortest sorted list of ranges that exactly cover all of the integers in the array. That is, each element of nums is covered by precisely one of the ranges, and no integer x exists in which x is in one of the ranges but not in nums.
我们必须生成能精确覆盖数组中所有数字的最短范围列表。以 nums = [0,1,2,4,5,7] 为输入,输出为 ["0->2", "4->5", "7"]。因此,在第一次迭代中,我们的 for 循环将从 0 迭代到 n(n 为向量大小),并赋值 a = nums[i]。现在,在第一次迭代中,I = 0,我们寻找一个条件,判断是否 I == n-1 或 nums[i] + 1 != nums[i+1]。因此,在第一次重复中,0 != 5 或 1 != 1(两者都不为真)条件为假。在第二次迭代中,I = 1;1 != 5 或 2 != 2(两者都不为真)条件为假。在第三次迭代中,I = 2;2 != 5 或 3 != 4(两者都为真)条件为真。所以现在将首次在 For 循环内执行。现在,如果 for 循环中的条件指定 2 != 0,我们会在结果中推入 a -> nums[i];给你一个排序的唯一整数数组 nums。范围 [a,b] 是 a 和 b 之间所有整数的集合(含端点)。返回能精确覆盖数组中所有整数的最短排序范围列表。也就是说,nums 的每个元素恰好被一个范围覆盖,并且不存在整数 x 使得 x 在某个范围内但不在 nums 中。
class Solution {
class Solution {
public:
public:
vectorsummaryRanges(vector & nums) {
vectorsummaryRanges(vector & nums) {
// resultant string
// 结果字符串
vectorresult;
vectorresult;
int n = nums.size();
int n = nums.size();
// if size happens to be zero return empty string
// 如果大小刚好为零,则返回空字符串
if(n == 0 )
if(n == 0 )
return result;
return result;
// assigning first element to a
// 将第一个元素赋值给 a
int a = nums[0];
int a = nums[0];
for(int i = 0; i<n; i++)
for(int i = 0; i<n; i++)
{
// if one of both is true
// 如果两者之一为真
if( i == n-1 || nums[i]+1 != nums[i+1])
if( i == n-1 || nums[i]+1 != nums[i+1])
{
// if current element is not equals a
// 如果当前元素不等于 a
// this means we have found a range.
// 这意味着我们已经找到了一个区间。
if(nums[i] != a)
if(nums[i] != a)
result.push_back(to_string(a)+ "->"+ to_string(nums[i]));
result.push_back(to_string(a)+ "->"+ to_string(nums[i]));
// this means we have reached to the end of string and now
// 这意味着我们已经到达了字符串的末尾,现在
// we have to add a that should be the last element
// 我们必须添加一个应该是最后一个元素的值
else
else
result.push_back(to_string(a));
result.push_back(to_string(a));
// checking for this condition so that a got updated for next range
// 检查此条件,以便 a 为下一个范围更新
// also n-1 so that a doesn't contain out of bound value
// 同时使用 n-1,以避免 a 包含越界的值
if(i != n-1)
if(i != n-1)
a = nums[i+1];
a = nums[i+1];
}
}
// return result
// 返回结果
return result;
return result;
}
};
575. You are a product manager in charge of a team working on a new product. Unfortunately, the most recent version of your product does not pass the quality check.
你是负责团队开发新产品的产品经理。不幸的是,你产品的最新版本未通过质量检查。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6acf | 官方: 否 | 付费: 否
答案:
Because each version is built on the preceding version, all versions following a poor version are also awful. Assume you have n versions [1, 2,..., n] and wish to locate the first poor one that causes all the subsequent ones to be bad. The API bool isBadVersion(version) returns if the version is bad. Create a method to locate the earliest problematic version. You should make as few API requests as possible.
因为每个版本都基于前一个版本构建,所以不良版本之后的所有版本都是糟糕的。假设你有 n 个版本 [1, 2, ..., n],并希望找到导致所有后续版本变坏的第一个不良版本。API bool isBadVersion(version) 返回该版本是否不良。创建一个方法来定位最早的问题版本。你应该尽可能减少 API 请求次数。
Example 1: - Input: n = 5, bad = 4
示例 1:- 输入:n = 5, bad = 4
- Output: 4
Explanation:call isBadVersion(3) -> falsecall isBadVersion(5) -> truecall isBadVersion(4) -> trueThen 4 is the first bad version.
Example 2: - Input: n = 1, bad = 1示例 2:- 输入:n = 1, bad = 1
Output: 1
The issue may be handled by iterating through all of the products from 1 to n and accessing the API to determine if each product is excellent or poor. However, because we are being requested to reduce the number of API calls, which is a significant aspect of the efficiency of an application in software development, we must devise a better solution. If the description above sparked the thought of a binary search in your mind, you are perfectly correct, my buddy. It is a basic implementation of binary search, except that we are given a function to call instead of an array to utilise its values. So, as normal, we compute the mid-value and then call the API isBadVersion(mid); if it returns a negative result, we are in the zone of defective products and must change or search space to (mid-1), since mid is already a faulty product. We then add this mid to our "res" variable, which maintains track of the defective product's initial index. If the API request returns yes, we are in the range of a decent product and must now change our search space's left index to mid+1.这个问题可以通过遍历从 1 到 n 的所有产品并访问 API 来判断每个产品是优良还是不良来处理。然而,由于我们被要求减少 API 调用的次数,这是软件开发中应用效率的重要因素,我们必须设计一个更好的解决方案。如果上述描述让你想到了二分搜索,那么我的朋友,你完全正确。这是二分搜索的一个基本实现,只不过我们被给定一个函数来调用,而不是一个数组来使用其值。所以,像往常一样,我们计算中间值,然后调用 API isBadVersion(mid);如果它返回负面结果,我们就处于缺陷产品的区域,必须将搜索空间改为 (mid-1),因为 mid 已经是缺陷产品。然后我们将这个 mid 添加到我们的 "res" 变量中,该变量跟踪缺陷产品的初始索引。如果 API 请求返回肯定结果,我们就处于优良产品的范围,此时必须将搜索空间的左索引改为 mid+1。
class Solution {
class Solution {
public:
public:
int firstBadVersion(int n) {
int firstBadVersion(int n) {
//we have to search from [1,2,....,n] so appoint left = 1 and right = n
//我们必须在 [1,2,....,n] 中搜索,因此设置 left = 1 和 right = n
int l = 1, r = n;
int l = 1, r = n;
while(l<=r) {
while(l<=r) {
//this is same as (l+r)/2 just prevent overflowing
//这等同于 (l+r)/2,只是防止溢出
int m = r+(l-r)/2;
int m = r+(l-r)/2;
// if m = 1 and it is bad then its first bad version or if m is bad and m-1 is not bad then its first bad version
//如果 m = 1 且它是坏的,则是第一个坏版本;或者 m 是坏的且 m-1 不是坏的,则是第一个坏版本
if((m == 1 && isBadVersion(m)) || isBadVersion(m) != isBadVersion(m-1))
if((m == 1 && isBadVersion(m)) || isBadVersion(m) != isBadVersion(m-1))
return m;
return m;
else if(!isBadVersion(m)) //if m is not bad then we have to search in right side
else if(!isBadVersion(m)) //如果 m 不是坏的,则必须在右侧搜索
l = m+1;
l = m+1;
else // if m is bad then we have to search at left side to find first bad version
else //如果 m 是坏的,则必须在左侧搜索以找到第一个坏版本
r = m-1;
r = m-1;
}
//if not bad version found
//如果没有找到坏版本
return -1;
return -1;
}
};
576. Move all 0s to the end of an integer array nums while keeping the relative order of the non-zero members. It is important to note that you must accomplish this in-place, without producing a duplicate of the array.
将所有0移动到整数数组nums的末尾,同时保持非零成员的相对顺序。需要注意的是,你必须原地完成此操作,不能生成数组的副本。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6ad2 | 官方: 否 | 付费: 否
答案:
Example 1: - Input: nums = [0,1,0,3,12]
示例1:- 输入:nums = [0,1,0,3,12]
Output: [1,3,12,0,0]
Example 2: - Input: nums = [0]示例2:- 输入:nums = [0]
Output: [0]
The method used is a two-pointer algorithm that reads and writes pointers. Traverse all the integers in the input array, and if the current num is not zero, write the current value to the index pointed by write ptr; otherwise, do nothing.使用的方法是一种双指针算法,包含读指针和写指针。遍历输入数组中的所有整数,如果当前数字不为零,则将当前值写入写指针指向的索引;否则,不做任何操作。
void moveZeroes(vector
void moveZeroes(vector& nums) {
// Base case: If the input is empty
// 基本情况:如果输入为空
if (nums.empty()) {
if (nums.empty()) {
// input is empty, nothing to process
// 输入为空,无需处理
return;
return;
}
// Initialize read and write indices that initalizes to 0
// 初始化读和写索引,初始值均为0
int rIdx = 0;
int rIdx = 0;
int wIdx = 0;
int wIdx = 0;
// Variable to store number of zeros
// 用于存储零的数量的变量
int numzeros = 0;
int numzeros = 0;
// Traverse the loop for all input numbers
// 遍历循环中的所有输入数字
while (rIdx < nums.size()) {
while (rIdx < nums.size()) {
// Check whether the current number is zero or not
// 检查当前数字是否为零
if (nums[rIdx] != 0) {
if (nums[rIdx] != 0) {
// Current number is not zero, push it to the write
// 当前数字不是零,将其推送到写入
// index
// 索引
nums[wIdx++] = nums[rIdx];
nums[wIdx++] = nums[rIdx];
}
else{
否则{
// The current number is a zero, increment the count
// 当前数字是零,增加计数
numzeros++;
numzeros++;
}
// Increment the read index
// 增加读取索引
rIdx++;
rIdx++;
}
// Fill the zeros at the end of array
// 将零填充到数组末尾
while (numzeros--) {
while (numzeros--) {
nums[wIdx++] = 0;
nums[wIdx++] = 0;
}
return;
return;
}
577. Determine whether a pattern and a string s follow the same pattern. A full match indicates that there is a bijection between a letter in pattern and a non-empty word in s.
判断一个模式和一个字符串 s 是否遵循相同的模式。完全匹配表示模式中的一个字母与 s 中的一个非空单词之间存在一一对应关系。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6ad5 | 官方: 否 | 付费: 否
答案:
Example 1: - Input: pattern = "abba", s = "dog cat cat dog"
示例 1: - 输入:pattern = "abba",s = "dog cat cat dog"
Output: true
Example 2: - Input: pattern = "abba", s = "dog cat cat fish"示例 2:- 输入:pattern = "abba",s = "dog cat cat fish"
Output: false
Example 3: - Input: pattern = "aaaa", s = "dog cat cat dog"示例 3:- 输入:pattern = "aaaa",s = "dog cat cat dog"
Output: false
The words in s will be mapped to their corresponding letters in the pattern. If pattern[i] already exists, see if s[i] is the same as pattern[i]. Let's utilise hashmaps to map pattern[i] and worlds in "s." Because the words are provided by a single string s, we may build another array of strings to hold all of them for ease of implementation. Iterate over the string s and insert the word into our string array if there is space.字符串 s 中的单词将被映射到模式中对应的字母。如果 pattern[i] 已经存在,则检查 s[i] 是否与 pattern[i] 相同。我们利用哈希表将 pattern[i] 与 "s" 中的单词进行映射。因为单词由单个字符串 s 提供,为便于实现,我们可以构建另一个字符串数组来存放所有单词。遍历字符串 s,如果有空格,则将单词插入到我们的字符串数组中。
string String_toOrder(map <string, char>& str_map, string s) {
string String_toOrder(map <string, char>& str_map, string s) {
char cur_label = 'a';
char cur_label = 'a';
string word, output;
string word, output;
for(int i = 0; i <= s.length(); i++) {
for(int i = 0; i <= s.length(); i++) {
if(s[i] == ' ' || i == s.length()) {
if(s[i] == ' ' || i == s.length()) {
if(str_map.find(word) == str_map.end()) str_map[word] = cur_label++;
if(str_map.find(word) == str_map.end()) str_map[word] = cur_label++;
output += str_map[word];
output += str_map[word];
word = "";
word = "";
} else word += s[i];
} else word += s[i];
}
return output;
return output;
}
string Pattern_toOrder(map <char, char>& pat_map, string pattern) {
string Pattern_toOrder(map <char, char>& pat_map, string pattern) {
char cur_label = 'a';
char cur_label = 'a';
string output;
string output;
for(int i = 0; i < pattern.length(); i++) {
for(int i = 0; i < pattern.length(); i++) {
if(pat_map.find(pattern[i]) == pat_map.end()) pat_map[pattern[i]] = cur_label++;
if(pat_map.find(pattern[i]) == pat_map.end()) pat_map[pattern[i]] = cur_label++;
output += pat_map[pattern[i]];
output += pat_map[pattern[i]];
}
return output;
return output;
}
bool wordPattern(string pattern, string s) {
bool wordPattern(string pattern, string s) {
map <string, char> StringMap;
map <string, char> StringMap;
map <char, char> PatternMap;
map <char, char> PatternMap;
string Pattern_InOrder = Pattern_toOrder(PatternMap, pattern);
string Pattern_InOrder = Pattern_toOrder(PatternMap, pattern);
string String_InOrder = String_toOrder(StringMap, s);
string String_InOrder = String_toOrder(StringMap, s);
return Pattern_InOrder == String_InOrder;
return Pattern_InOrder == String_InOrder;
}
578. You are now engaged in the following activities: Nim Play this game with a friend: At first, there is a pile of stones on the table. You and your pal will take turns, and you will go first.
你现在参与以下活动:快速取子游戏,和朋友一起玩:起初,桌上有一堆石头。你和你的朋友轮流取子,你先开始。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6ad8 | 官方: 否 | 付费: 否
答案:
The individual whose turn it is will take 1 to 3 stones from the stack on each round. The winner is the person who removes the last stone. Return true if you can win the game providing both you and your companion play optimally, else return false.
轮到你的时候,每轮从堆中取1到3块石头。取走最后一块石头的人获胜。如果双方都采取最优策略,当你能赢得游戏时返回true,否则返回false。
Example 1: - Input: n = 4
示例1:- 输入:n = 4
Output: false
Explanation:说明:
These are the possible outcomes: 1. You remove 1 stone. Your friend removes 3 stones, including the last stone. Your friend wins. 2. You remove 2 stones. Your friend removes 2 stones, including the last stone. Your friend wins. 3. You remove 3 stones. Your friend removes the last stone. Your friend wins. In all outcomes, your friend wins.
这些是可能的结果:1. 你取走1块石头。你的朋友取走3块石头,包括最后一块。你的朋友获胜。2. 你取走2块石头。你的朋友取走2块石头,包括最后一块。你的朋友获胜。3. 你取走3块石头。你的朋友取走最后一块石头。你的朋友获胜。在所有结果中,你的朋友都获胜。
Example 2: - Input: n = 1
示例2:- 输入:n = 1
Output: true
Example 3: - Input: n = 2示例3: - 输入:n = 2
Output: true
If there is only one stone, I shall begin by taking it. I'll be the victor.如果只有一块石头,我会先拿走它。我将成为胜利者。
If there are two stones, I can take both and win since a person is permitted to take up to three stones. Similarly, if three stones are there, I will win. However, if there are four stones and I am the first to begin, I can only take three. So, after my turn, my friend will be left with the last stone, giving him victory. Similarly, if there are 8 stones, my friend will always grab the final stone. As you can see, this pattern repeats itself. You lose when the number of stones present is a multiple of four. So all we have to do is determine if 'n' is a multiple of four. If true, either return 0 (since you lost) or return 1. (since you won).
如果有两块石头,我可以都拿走并获胜,因为允许一个人最多拿三块石头。同样,如果有三块石头,我也会赢。然而,如果有四块石头且我先行,我只能拿三块。所以,我的回合之后,我的朋友将剩下最后一块石头,使他获胜。同样,如果有8块石头,我的朋友总是会拿走最后一块。如你所见,这个模式会重复。当石头数量是四的倍数时你会输。所以我们只需判断‘n’是否是四的倍数。如果为真,要么返回0(因为你输了)或返回1(因为你赢了)。
class Solution {
class Solution {
public:
public:
bool canWinNim(int n) {
bool canWinNim(int n) {
return n%4;
return n%4;
}
};
579. What is BOM?
什么是BOM?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6ade | 官方: 否 | 付费: 否
答案:
JavaScript may "speak to" the browser via the Browser Object Model (BOM). It is made up of the window's children, navigator, history, screen, location, and document. The Browser Object Model is not standardized and might vary depending on the browser.
JavaScript可以通过浏览器对象模型(BOM)“与浏览器对话”。它由窗口的子对象、导航器、历史记录、屏幕、位置和文档组成。浏览器对象模型未标准化,可能因浏览器而异。
580. What is method overriding?
什么是方法重写?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6ae4 | 官方: 否 | 付费: 否
答案:
Method overloading allows the method to have the same name but have different parameters or argument types. It is linked to compile-time polymorphism. The following are some considerations to bear in mind while overloading methods in Java. A return type cannot be overloaded. Although static methods can be overloaded, the arguments or input parameters must be distinct. We cannot overload two methods that vary solely by a static keyword. The main() function, like other static methods, can be overloaded.
方法重载允许方法有相同名称但有不同的参数或参数类型。它与编译时多态相关。以下是在Java中重载方法时需要考虑的一些事项。返回类型不能被重载。虽然静态方法可以被重载,但参数或输入参数必须不同。我们不能重载两个仅因静态关键字而不同的方法。main()函数,和其他静态方法一样,可以被重载。
581. What are the problems with post message target origin as a wildcard?
使用通配符作为post message目标源有什么问题?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6aea | 官方: 否 | 付费: 否
答案:
The postMessage method's second argument defines which origin is permitted to receive the message. If you provide the wildcard "*" as a parameter, the message can come from any origin. When sending the message, the sender window has no means of knowing if the target window is at the intended origin. If the target window was browsed to another origin, the data would be sent to that origin. As a result, XSS vulnerabilities may arise.
postMessage方法的第二个参数指定哪个源被允许接收消息。如果你提供通配符“*”作为参数,消息可能来自任何源。发送消息时,发送窗口无法知道目标窗口是否在预期的源。如果目标窗口被浏览到另一个源,数据将被发送到那个源。因此,可能出现XSS漏洞。
582. Return true if an integer n is a power of four. Return false otherwise. If there exists an integer x such that n == 4^x, then n is a power of four.
如果整数n是四的幂,则返回true。否则返回false。如果存在整数x使得n == 4^x,则n是四的幂。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6aed | 官方: 否 | 付费: 否
答案:
Example 1: - Input: n = 16
示例1: - 输入:n = 16
Output: true
Example 2: - Input: n = 5示例2: - 输入:n = 5
Output: false
Example 3: - Input: n = 1示例3:- 输入:n = 1
Output: true
To answer this question, use the "Power of 2" formula. Idea: If a number is a power of 4, it must also be a power of 2, but the opposite is not true. For example, 64 is both a power of 4 and a power of 2. However, 128 is just a power of two, not a power of four. So the game is solely about identifying the power of four. Let's look at some examples to see how they vary. n = 64: (64+1) per cent 3!= 0 "It is a power of two." n = 128: It is a power of two as well, but (128+1) per cent "== 0. " It is not a multiple of four." As a result, if n is a power of 2 and n+1 is not divisible by 3, then n is a power of 4.要回答这个问题,请使用“2的幂”公式。思路:如果一个数是4的幂,它必然也是2的幂,但反过来不一定成立。例如,64既是4的幂也是2的幂。然而,128只是2的幂,不是4的幂。所以关键在于识别4的幂。让我们看一些例子来了解它们的差异。n = 64:(64+1) % 3 != 0 “它是2的幂。” n = 128:它也是2的幂,但(128+1) % 3 == 0。“它不是4的倍数。”因此,如果n是2的幂且n+1不能被3整除,那么n就是4的幂。
bool isPowerOfFour(int n) {
bool isPowerOfFour(int n) {
int val = n; //Storing in another variable
int val = n; //存储到另一个变量中
//as value of n may change
//因为n的值可能会变化
if(n <= 0)
if(n <= 0)
return false;
返回 false;
if((n & (n-1)) == 0) //Checking if it is a power of 2
if((n & (n-1)) == 0) //检查它是否为2的幂
{
if( (val+1) % 3 != 0) //If given_number + 1 is not divisilbe by 3
if( (val+1) % 3 != 0) //如果给定数 + 1 不能被3整除
return true; //then it is our ans or power of 4
return true; //那么它就是我们的答案或4的幂
}
return false;
返回 false;
}
583. Return an array containing the intersection of two integer arrays nums1 and nums2. Each element in the result must be distinct, and the result may be returned in any order.
返回一个数组,包含两个整数数组nums1和nums2的交集。结果中的每个元素必须唯一,并且结果可以按任意顺序返回。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6af0 | 官方: 否 | 付费: 否
答案:
Example 1: - Input: nums1 = [1,2,2,1], nums2 = [2,2]
示例 1:- 输入:nums1 = [1,2,2,1],nums2 = [2,2]
Output: [2]
Example 2: - Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4]示例 2:- 输入:nums1 = [4,9,5],nums2 = [9,4,9,8,4]
- Output: [9,4]
Explanation: [4,9] is also accepted.
In constant time, we utilise a hash table to keep track of all the unique components of a smaller array. Then, using the hash table, explore the larger list to discover the unique entries.在常数时间内,我们利用哈希表来跟踪较小数组的所有唯一元素。然后,使用哈希表遍历较大的列表以发现唯一条目。
class Solution {
class Solution {
public:
public:
// TC: O(M + N), SC: O(min(M, N))
// 时间复杂度:O(M + N),空间复杂度:O(min(M, N))
// Using Hashing
// 使用哈希法
vectorhashingSol(vector & nums1, vector & nums2) {
vectorhashingSol(vector & nums1, vector & nums2) {
vectorresult;
vectorresult;
// find the smaller array to create a hash table
// 找到较小的数组来创建哈希表
vector*smaller = nums1.size() < nums2.size() ? &nums1 : &nums2;
vector*smaller = nums1.size() < nums2.size() ? &nums1 : &nums2;
vector*bigger = nums1.size() > nums2.size() ? &nums1 : &nums2;
vector*bigger = nums1.size() > nums2.size() ? &nums1 : &nums2;
unordered_set
unordered_setelements(smaller->begin(), smaller->end());
// Now in the bigger array, check each element if it belongs to the other array
// 现在在较大的数组中,检查每个元素是否属于另一个数组
// using the hash table
// 使用哈希表
for(const int& num: *bigger)
for(const int& num: *bigger)
if(elements.count(num)) {
if(elements.count(num)) {
result.emplace_back(num);
result.emplace_back(num);
// remove the current element from hash table
// 从哈希表中移除当前元素
elements.erase(num);
elements.erase(num);
}
return result;
return result;
}
vector
vectorintersection(vector & nums1, vector & nums2) {
return hashingSol(nums1, nums2);
return hashingSol(nums1, nums2);
}
};
584. Return an array containing the intersection of two integer arrays nums1 and nums2. Each element in the result must appear as many times as it appears in both arrays, and the result can be returned in any order.
返回一个数组,包含两个整数数组 nums1 和 nums2 的交集。结果中的每个元素必须出现与在两个数组中都出现的次数相同的次数,结果可以按任意顺序返回。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6af4 | 官方: 否 | 付费: 否
答案:
Example 1: - Input: nums1 = [1,2,2,1], nums2 = [2,2]
示例 1:- 输入:nums1 = [1,2,2,1],nums2 = [2,2]
Output: [2,2]
Example 2: - Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4]示例 2:- 输入:nums1 = [4,9,5],nums2 = [9,4,9,8,4]
- Output: [4,9]
Explanation: [9,4] is also accepted.
We're making a nums1 frequency map. Then we go through nums2 and see whether any of its items are present in nums1. If so, we reduce the frequency count of that element in the map and include it in the final response.我们制作 nums1 的频率映射。然后遍历 nums2,查看其任何项是否存在于 nums1 中。如果存在,我们减少该元素在映射中的频率计数,并将其包含在最终响应中。
class Solution {
class Solution {
public:
public:
vectorintersect(vector & nums1, vector & nums2) {
vectorintersect(vector & nums1, vector & nums2) {
unordered_map<int,int>M;
unordered_map<int,int>M;
for(int i=0;i<nums1.size();i++)
for(int i=0;i<nums1.size();i++)
{
M[nums1[i]]++;
M[nums1[i]]++;
}
vector
vectorans;
for(int i=0;i<nums2.size();i++)
for(int i=0;i<nums2.size();i++)
{
auto itr=M.find(nums2[i]);
auto itr=M.find(nums2[i]);
if(itr!=M.end() && itr->second != 0){
if(itr!=M.end() && itr->second != 0){
ans.push_back(nums2[i]);
ans.push_back(nums2[i]);
itr->second--;
itr->second--;
}
}
return ans;
return ans;
}
};
585. Write a function that returns True if num is a perfect square and False otherwise given a positive integer num. Following that, avoid using any built-in library functions such as sqrt.
编写一个函数,给定一个正整数 num,如果 num 是完全平方数则返回 True,否则返回 False。随后,避免使用任何内置库函数,例如 sqrt。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6afb | 官方: 否 | 付费: 否
答案:
Example 1: - Input: num = 16
示例1: - 输入:num = 16
Output: true
Example 2: - Input: num = 14示例2: - 输入:num = 14
Output: false
This solution takes advantage of the fact that all square numbers are the sum of odd integers beginning with 1.此解决方案利用了所有平方数都是从 1 开始的奇数之和这一事实。
As an example:
例如:
1 = 1 1+3 = 4 1 + 3 + 5 = 9 1 + 3 + 5 + 7 = 16
So, starting with 1, we remove odd numbers from the supplied number. When the number approaches zero, it is a perfect square. It is not a perfect square if it approaches a negative value without reaching zero.
因此,从 1 开始,我们从给定数字中减去奇数。当数字接近零时,它就是完全平方数。如果它接近负值而未到达零,则它不是完全平方数。
class Solution {
class Solution {
public:
public:
bool isPerfectSquare(int num) {
bool isPerfectSquare(int num) {
int i = 1;
int i = 1;
while(num>0)
while(num>0)
{
num -= i;
num -= i;
i += 2;
i += 2;
if(num==0)
if(num==0)
{
return true;
返回 true;
}
}
return false;
返回 false;
}
};
586. Return true if ransomNote can be generated using the letters from magazine, and false otherwise, given two strings ransomNote and magazine. In ransomNote, each letter in the magazine may only be used once.
给定两个字符串 ransomNote 和 magazine,如果可以使用 magazine 中的字母生成 ransomNote,则返回 true,否则返回 false。在 ransomNote 中,magazine 中的每个字母只能使用一次。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6aff | 官方: 否 | 付费: 否
答案:
Example 1: - Input: ransomNote = "a", magazine = "b"
示例 1: - 输入:ransomNote = "a",magazine = "b"
Output: false
Example 2: - Input: ransomNote = "aa", magazine = "ab"示例 2: - 输入:ransomNote = "aa",magazine = "ab"
Output: false
Example 3: - Input: ransomNote = "aa", magazine = "aab"示例 3: - 输入:ransomNote = "aa",magazine = "aab"
Output: true
If the size of ransomNote exceeds the size of magazine, return false. Else In two separate unordered maps, store all of the ransomNote and magazaine characters, as well as their related frequencies. If the frequency of a character in m ran is larger than the frequency in m mag, return false; otherwise, return true.如果 ransomNote 的大小超过 magazine 的大小,则返回 false。否则,在两个独立的无序映射中,存储 ransomNote 和 magazine 的所有字符及其相关频率。如果 m_ran 中某个字符的频率大于 m_mag 中的频率,则返回 false;否则,返回 true。
class Solution {
class Solution {
public:
public:
bool canConstruct(string ransomNote, string magazine)
bool canConstruct(string ransomNote, string magazine)
{
if(ransomNote.size()>magazine.size()) return false;
if(ransomNote.size()>magazine.size()) return false;
unordered_map<char,int>m_ran;
unordered_map<char,int>m_ran;
unordered_map<char,int>m_mag;
unordered_map<char,int>m_mag;
for(auto i:ransomNote)
for(auto i:ransomNote)
m_ran[i]++;
m_ran[i]++;
for(auto i:magazine)
for(auto i:magazine)
m_mag[i]++;
m_mag[i]++;
for(int i=0;i<ransomNote.size();i++)
for(int i=0;i<ransomNote.size();i++)
{
if(m_ran[ransomNote[i]]>m_mag[ransomNote[i]])
if(m_ran[ransomNote[i]]>m_mag[ransomNote[i]])
return false;
返回 false;
}
return true;
返回 true;
}
};
Additional Resources
其他资源
- https://www.interviewbit.com/technical-interview-questions/
- https://www.interviewbit.com/coding-interview-questions/
- https://www.interviewbit.com/software-engineering-interview-questions/
- https://www.interviewbit.com/azure-data-factory-interview-questions/
- https://www.interviewbit.com/blog/
- https://www.interviewbit.com/mock-interview/
- https://www.scaler.com/career-plan/
587. What is event bubbling?
什么是事件冒泡?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6b02 | 官方: 否 | 付费: 否
答案:
An event bubbling technique is a kind of event propagation that starts with the innermost target element, and then successively triggers on the subsequent ancestors (parents) of the target element inside the same hierarchical context until the outermost DOM element is reached.
事件冒泡技术是一种事件传播方式,它从最内层的目标元素开始,然后在相同的层级上下文中依次触发目标元素的后续祖先(父元素),直到最外层的DOM元素。
588. Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
给定两个字符串 needle 和 haystack,返回 needle 在 haystack 中首次出现的索引,如果 needle 不是 haystack 的一部分,则返回 -1。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6b0d | 官方: 否 | 付费: 否
答案:
Example 1: - Input: haystack = "hello", needle = "ll"
示例1: - 输入:haystack = "hello",needle = "ll"
Output: 2
Example 2: - Input: haystack = "aaaaa", needle = "bba"示例2: - 输入:haystack = "aaaaa",needle = "bba"
Output: -1
We use the KMP string matching algorithm, which performs this task in linear time. We need to preprocess and create an LPS array in which lps[i] refers to the longest possible prefix that is also a suffix.我们使用KMP字符串匹配算法,它能在线性时间内完成此任务。我们需要预处理并创建一个LPS数组,其中 lps[i] 指的是同时也是后缀的最长可能前缀。
class Solution {
class Solution {
public:
public:
// calculate the lps function
// 计算 lps 函数
vectorcalc(string pat, int m)
vectorcalc(string pat, int m)
{
vectorlps(m,0);
vectorlps(m,0);
int i=1, j=0;
int i=1, j=0;
while(i<m){
while(i<m){
if(pat[i]==pat[j]){
if(pat[i]==pat[j]){
j++;
j++;
lps[i++]=j;
lps[i++]=j;
}
else{
否则{
if(j) j=lps[j-1];
if(j) j=lps[j-1];
else lps[i++]=0;
else lps[i++]=0;
}
}
return lps;
return lps;
}
int strStr(string haystack, string needle) {
int strStr(string haystack, string needle) {
int n=haystack.length(), m=needle.length();
int n=haystack.length(), m=needle.length();
if(m==0) return 0;
if(m==0) return 0;
vectorlps = calc(needle, m);
vectorlps = calc(needle, m);
int i=0,j=0;
int i=0,j=0;
while(i<n && j<m){
while(i<n && j<m){
if(haystack[i]==needle[j]){
if(haystack[i]==needle[j]){
i++;
i++;
j++;
j++;
}
if(j==m) return i-j; // since we are returning the first valid index, we just return i-j. If we had to return all valid indices, then we would have to do j=lps[j-1] after this step, since pattern can repeat, and the new pattern may already have started.
if(j==m) return i-j; // 由于我们返回第一个有效索引,只需返回i-j。如果需要返回所有有效索引,则在此步骤后需执行j=lps[j-1],因为模式可能重复,且新模式可能已开始。
else if(i<n && j<m && haystack[i]!=needle[j]){
else if(i<n && j<m && haystack[i]!=needle[j]){
if(j) j=lps[j-1];
if(j) j=lps[j-1];
else i++;
else i++;
}
}
return -1;
return -1;
}
};
589. What is a prototype chain?
什么是原型链?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6b13 | 官方: 否 | 付费: 否
答案:
A prototype chain is used to create new types of things based on existing ones. It is similar to inheritance in a class-based language. The prototype on object instance is accessible via Object.getPrototypeOf(object) or proto property, and the prototype on constructors function is accessible via Object.prototype.
原型链用于基于现有类型创建新类型的事物。它类似于基于类的语言中的继承。对象实例上的原型可通过Object.getPrototypeOf(object)或proto属性访问,构造函数上的原型则可通过Object.prototype访问。
590. What are lambda or arrow functions?
什么是lambda或箭头函数?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6b1c | 官方: 否 | 付费: 否
答案:
Arrow functions, which do not have their own this, arguments, super, and new.target, are a shorter syntax for a function expression and do not have their own this, arguments, super, or new.target. Non-method functions are what these functions are best suited for, and they cannot be used as constructors.
箭头函数是一种函数表达式的更短语法,不具有自己的this、arguments、super和new.target,也不具有自己的this、arguments、super或new.target。这些函数最适合非方法函数,且不能用作构造函数。
591. What is a service worker?
什么是服务工作者?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6b27 | 官方: 否 | 付费: 否
答案:
A service worker (JavaScript file) is a piece of code that runs in the background and provides features that don't require a web page or user action. Some of the most significant service worker features are offline-first web application development, periodic background, push notifications, interception, and programmatic management of a cache of responses.
服务工作者(JavaScript文件)是一段在后台运行的代码,提供不需要网页或用户操作的功能。服务工作者最重要的功能包括离线优先的Web应用开发、周期性后台任务、推送通知、拦截以及响应缓存的编程管理。
592. What is a post message?
什么是 post message?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6b2d | 官方: 否 | 付费: 否
答案:
Cross-origin communication between Window objects (e.g., between a page and a pop-up that it spawned, or between a page and an iframe embedded within it) using Post message is possible. Scripts on different pages are allowed to communicate if and only if they adhere to the same-origin policy (i.e., they share the same protocol, port number, and host).
使用 Post message 可以在 Window 对象之间进行跨源通信(例如,页面与其弹出的窗口之间,或页面与嵌入其中的 iframe 之间)。不同页面上的脚本只有在遵守同源策略(即它们共享相同的协议、端口号和主机)时,才允许进行通信。
593. To determine and return the square root of an unspecified integer x, compute and return x. Because the return type is an integer, the decimal digits are truncated, and only the integer part of the result is returned.
要确定并返回一个未指定整数 x 的平方根,计算并返回 x。由于返回类型是整数,小数部分会被截断,只返回结果的整数部分。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6b30 | 官方: 否 | 付费: 否
答案:
Because the return type is an integer, the decimal digits are truncated, and only the integer part of the result is returned.
由于返回类型是整数,小数部分会被截断,只返回结果的整数部分。
Example 1: - Input: x = 4
示例 1: - 输入:x = 4
Output: 2
Example 2:示例2:
Input: x = 8 Output: 2
输入:x = 8 输出:2
Explanation: The square root of 8 is 2.82842..., and since the decimal part is truncated, 2 is returned.
解释:8 的平方根是 2.82842...,由于小数部分被截断,返回 2。
We are converging to the closest value using binary search, so we return high because high will always be the truncated value. Since we are converging to the closest value using binary search, we return high because high will always be the truncated value. In the case of a perfect square we will end with our mid pointer at the solution, and in the case of not a perfect square high pointer will end at the floor value because it was moving towards the lower side. If we were to find the ceil value, we would have considered the low pointer as it was going higher and we would have returned low. The code is:
我们使用二分搜索收敛到最接近的值,所以返回 high,因为 high 总是截断后的值。由于我们使用二分搜索收敛到最接近的值,所以我们返回 high,因为 high 总是截断后的值。在完全平方数的情况下,我们的 mid 指针最终会指向解;而在非完全平方数的情况下,high 指针最终会指向向下取整的值,因为它一直向较低一侧移动。如果我们要求 ceil 值,我们就会考虑 low 指针,因为它向较高方向移动,我们会返回 low。代码如下:
class Solution {
class Solution {
public:
public:
int mySqrt(int num) {
int mySqrt(int num) {
long unsigned int l = 1, h = num,mid;
long unsigned int l = 1, h = num,mid;
while(l <= h)
while(l <= h)
{
mid = l + (h - l)/2;
mid = l + (h - l)/2;
if(mid * mid == num)
if(mid * mid == num)
return mid;
返回 mid;
else if(mid * mid > num)
否则如果(mid * mid > num)
h = mid - 1;
h = mid - 1;
else l = mid + 1;
否则 l = mid + 1;
}
return h;
返回 h;
}
};
594. What are server-sent events?
什么是服务器发送事件?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6b34 | 官方: 否 | 付费: 否
答案:
A browser using server-sent events (SSE) is able to receive automatic updates from a server via an HTTP connection without having to go through a polling procedure. These are one-way communications, in which events flow from the server to the client only. For example, stock price updates, Facebook/Twitter updates, and news feeds have been employed.
使用服务器发送事件(SSE)的浏览器能够通过 HTTP 连接从服务器自动接收更新,而无需进行轮询过程。这些是单向通信,事件仅从服务器流向客户端。例如,股票价格更新、Facebook/Twitter 更新及新闻订阅源都已采用这种方式。
595. Why do you need strict mode?
为什么需要严格模式?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6b3a | 官方: 否 | 付费: 否
答案:
By disabling strict mode, you can make sure that your JavaScript is "secure" by not emitting "bad syntax" warnings. For example, it suppresses the generation of a global variable if an error is thrown and also generates an error for assignments to non-writable properties, getters-only properties, non-existing properties, non-existing variables, and non-existing objects.
通过禁用严格模式,你可以通过不发出“错误语法”警告来确保你的 JavaScript 是“安全的”。例如,它会抑制在抛出错误时全局变量的生成,并对对不可写属性、仅 getter 属性、不存在的属性、不存在的变量和不存在的对象的赋值生成错误。
596. What is Object Cloning?
什么是对象克隆?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6b3d | 官方: 否 | 付费: 否
答案:
An exact copy of an object is created using the clone() method of the object class. To create a perfect clone of an object, the Cloneable interface must be implemented by a class that defines its object clone.
对象的精确副本通过对象类的 clone() 方法创建。要创建对象的完美克隆,必须由定义其对象克隆的类实现 Cloneable 接口。
597. What is event capturing?
什么是事件捕获?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6b40 | 官方: 否 | 付费: 否
答案:
A type of event propagation that involves the event first being captured by the outermost element and then being transmitted to the child elements of the target element in the same hierarchical structure until it reaches the innermost DOM element.
一种事件传播类型,涉及事件首先被最外层元素捕获,然后沿相同的层次结构传递给目标元素的子元素,直到到达最内层的 DOM 元素。
598. Given an array nums of size n, determine the element that appears more than ⌊n / 2⌋ times. You may assume that the element that appears more than ⌊n / 2⌋ times always exists in the array.
给定一个大小为 n 的数组 nums,确定出现次数超过 ⌊n / 2⌋ 次的元素。你可以假设该数组中总是存在出现次数超过 ⌊n / 2⌋ 次的元素。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6b46 | 官方: 否 | 付费: 否
答案:
Example 1: - Input: nums = [3,2,3]
示例 1:- 输入:nums = [3,2,3]
Output: 3
Example 2: - Input: nums = [2,2,1,1,1,2,2]示例 2:- 输入:nums = [2,2,1,1,1,2,2]
Output: 2
We start by initialising the ans variable with the array index 0 and starting at 1. We then check if the ans variable equals the current element each time it is reached. It is incremented if the variable is equal to the current element and it is decremented if it is not. This method works because it is more efficient to increase the number of increments than decrease the number of decrements.我们首先用数组索引0初始化ans变量,并从1开始。然后每次到达时检查ans变量是否等于当前元素。如果变量等于当前元素则递增,如果不等于则递减。这种方法有效,因为递增次数的增加比递减次数的减少更高效。
class Solution {
class Solution {
public:
public:
int majorityElement(vector& nums) {
int majorityElement(vector& nums) {
int count=0, ans;
int count=0, ans;
for(int i=0;i<nums.size();i++){
for(int i=0;i<nums.size();i++){
if(count==0){
if(count==0){
ans=nums[i];
ans=nums[i];
count=1;
count=1;
continue;
continue;
}
if(ans!=nums[i])
if(ans!=nums[i])
count--;
count--;
else
else
count++;
count++;
}
return ans;
return ans;
}
};
599. Reverse bits of a given 32 bits unsigned integer.
反转一个给定的32位无符号整数的位。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6b49 | 官方: 否 | 付费: 否
答案:
Example 1: - Input: n = 00000010100101000001111010011100
示例1: - 输入:n = 00000010100101000001111010011100
Output: 964176192 (00111001011110000010100101000000)
Explanation: The input binary string 00000010100101000001111010011100 represents the unsigned integer 43261596, so return 964176192 which its binary representation is 00111001011110000010100101000000.解释:输入二进制字符串 00000010100101000001111010011100 表示无符号整数 43261596,因此返回 964176192,其二进制表示为 00111001011110000010100101000000。
Example 2: - Input: n = 11111111111111111111111111111101
示例2: - 输入:n = 11111111111111111111111111111101
Output: 3221225471 (10111111111111111111111111111111)
Explanation: The input binary string 11111111111111111111111111111101 represents the unsigned integer 4294967293, so return 3221225471 whose binary representation is 10111111111111111111111111111111.解释:输入二进制字符串 11111111111111111111111111111101 表示无符号整数 4294967293,因此返回 3221225471,其二进制表示为 10111111111111111111111111111111。
The problem asks for a swap that swaps each pair of bits from the outside in. The swap operation looks at the pair of bits and flips each bit if it is different. We can select the ith bit and the jth bit with the expression (n >> i) & 1 and (n >> j) & 1. We then compare the two bits.
这个问题要求从外向内交换每一对位。交换操作会检查这对位,并在它们不同时翻转每一位。我们可以使用表达式 (n >> i) & 1 和 (n >> j) & 1 来选择第 i 位和第 j 位。然后我们比较这两位。
If they are equal, we don't have to do anything because swapping them would have no effect. If they're not equal, we XOR each bit with 1. This causes the bits to be swapped even though we're flipping them only to XOR them.
如果它们相等,我们无需做任何操作,因为交换它们不会有任何效果。如果它们不相等,我们将每一位与 1 进行 XOR。这会导致这两位被交换,尽管我们只是通过翻转它们来进行 XOR。
In the example (0, 1) would get changed to (1, 0) and (1, 0) to (0, 1) while (1, 0) and (1, 0) would become (0, 1). We can XOR each bit with ones by ORing the ith and jth bits with 1's. ((1U i) | (1U j)). Using our number to flip the ith and jth bits, we can XOR it with our number. To flip the bits in the ith and jth places, we can XOR our number with the ith and jth bits. The table can be thought of as a list of numbers p.
在示例中,(0, 1) 会变为 (1, 0),(1, 0) 会变为 (0, 1),而 (1, 0) 和 (1, 0) 会变为 (0, 1)。我们可以通过将第 i 位和第 j 位与 1 进行 OR 来将每一位与 1 进行 XOR。((1U << i) | (1U << j))。使用我们的数字来翻转第 i 位和第 j 位,我们可以将其与我们的数字进行 XOR。为了翻转第 i 和第 j 位置的位,我们可以将我们的数字与第 i 位和第 j 位进行 XOR。该表可以被视为一个数字列表 p。
class Solution {
class Solution {
public:
public:
uint32_t reverseBits(uint32_t n) {
uint32_t reverseBits(uint32_t n) {
int i = 0, j = 31;
int i = 0, j = 31;
while (i < j) {
while (i < j) {
if (((n >> i) & 1) != ((n >> j) & 1)) {
if (((n >> i) & 1) != ((n >> j) & 1)) {
n ^= ((1U << i) | (1U << j));
n ^= ((1U << i) | (1U << j));
}
i++, j--;
i++, j--;
}
return n;
返回 n;
}
};
600. Create a function that returns the Hamming weight of an unsigned integer (also known as the number of '1' bits).
创建一个函数,返回无符号整数的漢明权重(也称为“1”位的数量)。
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6b4c | 官方: 否 | 付费: 否
答案:
Example 1: - Input: n = 00000000000000000000000000001011
示例1: - 输入:n = 00000000000000000000000000001011
Output: 3
Explanation: The input binary string 00000000000000000000000000001011 has a total of three '1' bits.解释:输入二进制字符串 00000000000000000000000000001011 共有三个“1”位。
Example 2: - Input: n = 00000000000000000000000010000000
示例2: - 输入:n = 00000000000000000000000010000000
Output: 1
Explanation: The input binary string 00000000000000000000000010000000 has a total of one '1' bit.解释:输入二进制字符串 00000000000000000000000010000000 共有一个“1”位。
Example 3: - Input: n = 11111111111111111111111111111101
示例3: - 输入:n = 11111111111111111111111111111101
Output: 31
Explanation: The input binary string 11111111111111111111111111111101 has a total of thirty one '1' bits.解释:输入二进制字符串 11111111111111111111111111111101 共有三十一个“1”位。
In order to check if the last bit is 1 in a binary number, we must count the number of bits. We must also check if the last bit is 1. If it is 1, we must add it to our total. We can test this by inverting our number and checking if the last bit is 1. If the last bit is 1, we will add it to our total. We can invert our number up to 5 and check if it is 1.
为了检查二进制数中最后一位是否为1,我们必须计算位数。我们还必须检查最后一位是否为1。如果为1,则将其加到总数中。我们可以通过反转数字并检查最后一位是否为1来测试。如果最后一位是1,我们将其加到总数中。我们可以将数字反转最多5次,并检查是否为1。
class Solution {
class Solution {
public:
public:
int hammingWeight(uint32_t n) {
int hammingWeight(uint32_t n) {
int total=0;
int total=0;
while(n!=0){
while(n!=0){
if(n%2==1)
if(n%2==1)
total++;
total++;
n=n>>1;
n=n>>1;
}
return total;
return total;
}
};
601. What is the difference between document load and DOMContentLoaded events?
document load 和 DOMContentLoaded 事件之间有什么区别?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6b4f | 官方: 否 | 付费: 否
答案:
The DOMContentLoaded event takes place after the DOM tree has been updated with all of the page's nodes after they have been added. When all of the resources, including graphics and sub-frames, have been fully loaded, the load event is triggered.
DOMContentLoaded 事件在 DOM 树已更新并添加了页面所有节点之后触发。当所有资源(包括图形和子框架)都已完全加载时,会触发 load 事件。
602. What is inheritance?
什么是继承?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6b53 | 官方: 否 | 付费: 否
答案:
Let's use the analogy of traffic on the road to illustrate what inheritance is all about. This traffic has a few characteristics in common. It is made up of objects that are able to travel along the road and carry people as well as commodities from one location to another. These items are referred to as automobiles. These vehicles are distinct from one another in a number of respects, including but not limited to whether they are used to carry people or products, the maximum number of passengers that can be carried at one time, whether they are two-wheelers or four-wheelers, etc. As a result, we have a wide variety of vehicles, including automobiles, bicycles, scooters, auto-rickshaws, buses, and trucks, amongst others. As can be seen in the following example, we can use inheritance to represent this flow. In this context, the Vehicle is the foundational class that contains the behaviours and features that are shared by all Vehicles. After that, we have the subcategories of Vehicles, which include Automobiles, Bicycles, Buses, and Trucks.
让我们用道路上的交通来类比说明继承的含义。这种交通有一些共同的特征。它由能够沿道路行驶并将人员和商品从一个地点运送到另一个地点的对象组成。这些对象被称为汽车。这些车辆在多个方面彼此不同,包括但不限于它们是用于载人还是载货、一次可搭载的最大乘客数量、是两轮车还是四轮车等。因此,我们有各种各样的车辆,包括汽车、自行车、摩托车、自动三轮车、公交车和卡车等。如下例所示,我们可以使用继承来表示这种流。在此上下文中,Vehicle 是基类,包含所有车辆共享的行为和特征。然后,我们有车辆的子类,包括 Automobiles、Bicycles、Buses 和 Trucks。
603. What is polymorphism?
什么是多态?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6b57 | 官方: 否 | 付费: 否
答案:
Polymorphism means having different looks. In simple terms, polymorphism means that a message can be displayed in more than one way. Having a variety of different forms is what is meant by the term polymorphism. The capacity of a message to be presented in more than one form is an example of polymorphism, which we may explain using more straightforward language.
多态意味着有多种不同的外观。简单来说,多态意味着一条消息可以以多种方式显示。具有多种不同形式就是多态的含义。消息能够以多种形式呈现就是多态的一个例子,我们可以用更直白的语言来解释这一点。
Polymorphism is a case study drawn from real life: Different aspects of a person may coexist inside the same body at the same time. In the same way a guy simultaneously fulfils the roles of parent, husband, and worker. Therefore, the same individual might exhibit quite diverse behaviours depending on the context in which they are found. This phenomenon is known as polymorphism. In object-oriented programming, polymorphism is often regarded as one of the most essential characteristics to have. Polymorphism gives us the ability to carry out a single activity in a number of distinct ways. To put it another way, polymorphism gives you the ability to create only one interface while yet supporting various implementations. Because "poly" means numerous and "morphs" implies forms, this term refers to a large number of different forms.
多态是一个源自现实生活的案例:一个人的不同方面可能同时存在于同一个身体内。就像同一个男人同时扮演父亲、丈夫和员工角色一样。因此,同一个体根据其所处的环境可能表现出截然不同的行为。这种现象称为多态。在面向对象编程中,多态通常被视为最重要的特性之一。多态使我们能够以多种不同方式执行单一活动。换句话说,多态使您能够只创建一个接口,同时仍支持各种实现。因为“poly”意味着多个,“morphs”意味着形式,所以此术语指的是大量不同的形式。
604. What is static polymorphism?
什么是静态多态?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6b5a | 官方: 否 | 付费: 否
答案:
Like many other OOP languages, Java enables the implementation of several methods with the same name in the same class. Java, however, has a separate set of parameters known as method overloading, which is a static variation on polymorphism. At least one of the following three criteria must be different between the parameter sets: They must each accept a different number of parameters; one method must take two parameters, while the other must accept three. The argument types must differ, with one method taking a String and another accepting a Long. They must anticipate the parameters in a different sequence. One method, for example, takes a String and a Long, whereas another accepts a Long and a String. This type of overloading is not advised since it complicates the API's understanding.
与许多其他 OOP 语言一样,Java 允许在同一类中实现多个同名方法。然而,Java 有一组独立的参数,称为方法重载,这是多态的一种静态变体。参数集之间至少必须满足以下三个标准之一:它们必须接受不同数量的参数;一个方法必须接受两个参数,而另一个必须接受三个。参数类型必须不同,一个方法接受 String,另一个接受 Long。它们必须按不同顺序预期参数。例如,一个方法接受 String 和 Long,而另一个接受 Long 和 String。不建议使用这种重载,因为它使 API 难以理解。
In most situations, each of these overloaded methods gives a unique but fairly comparable set of capabilities. Each method has a unique signature due to the various argument sets. This signature instructs the compiler on the method to invoke and ties it to the method call. This method is known as static binding or static polymorphism.
在大多数情况下,这些重载方法中的每一个都提供独特但相当相似的功能集。由于参数集不同,每个方法都有独特的签名。此签名指示编译器要调用哪个方法,并将其绑定到方法调用。这种方法称为静态绑定或静态多态。
One method through which Java provides static polymorphism is method overloading. The argument list at compile time determines which of these two definitions of the identical function add() will be invoked. This phenomenon is sometimes referred to as compile-time polymorphism for this reason.
Java 提供静态多态的一种方式是通过方法重载。在编译时,参数列表决定将调用相同的函数 add() 的这两个定义中的哪一个。出于这个原因,此现象有时称为编译时多态。
605. What is dynamic polymorphism?
什么是动态多态?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6b5d | 官方: 否 | 付费: 否
答案:
This type of polymorphism prevents the compiler from determining the executed method. At runtime, the JVM must perform this function. Within an inheritance hierarchy, a subclass can override a method of its superclass, allowing the subclass's developer to alter or fully change the method's behaviour. This results in a type of polymorphism. The names and parameters of the methods implemented by the super- and subclasses are the same. They do, however, serve diverse purposes.
这种类型的多态使编译器无法确定要执行的方法。在运行时,JVM 必须执行此功能。在继承层次结构中,子类可以覆盖其超类的方法,允许子类的开发者修改或完全改变方法的行为。这会产生一种多态。超类和子类实现的方法名称和参数相同。然而,它们服务于不同的目的。
We have two classes in this example: ABC and XYZ. XYZ is a kid class, whereas ABC is a parent class. The parent class's myMethod() function is being replaced with that of the child class. In this example, the child class object has been assigned to the parent class reference, therefore the type of the object will be identified at run-time in order to identify which method will be invoked. Which version of the method would be invoked depends on the kind of object (not the type of reference).
在此示例中,我们有两个类:ABC 和 XYZ。XYZ 是子类,而 ABC 是父类。父类的 myMethod() 函数正被替换为子类的函数。在此示例中,子类对象已分配给父类引用,因此将在运行时确定对象的类型,以识别将调用哪个方法。将调用哪个版本的方法取决于对象的类型(而不是引用的类型)。
606. What is Late binding?
什么是后期绑定?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6b60 | 官方: 否 | 付费: 否
答案:
You may wish to employ an inheritance hierarchy in your project at times. To do this, you must respond to the question, "Which method will the JVM call?" Because it is dependent on the object on which the method is called, the response appears at runtime. The kind of reference, as shown in your code, is immaterial. You must differentiate three broad scenarios: Your object is of the superclass's type and is referred to as such. So, in this post's example, a BasicCoffeeMachine object is referred to as a BasicCoffeeMachine. Your object is of the subclass's type and is referred to as such. In this post's example, a PremiumCoffeeMachine object is referred to as a PremiumCoffeeMachine. Your object is of the subclass type and is referred to as the superclass. A PremiumCoffeeMachine object is referred to as a BasicCoffeeMachine in the CoffeeMachine example.
有时你可能希望在项目中使用继承层次结构。要做到这一点,你必须回答一个问题:“JVM 会调用哪个方法?”因为这取决于调用方法所在的对象,所以答案在运行时才会出现。正如代码中所示,引用的类型并不重要。你必须区分三种主要场景:你的对象是超类的类型,并按此类型引用。例如,在本文示例中,BasicCoffeeMachine 对象按 BasicCoffeeMachine 引用。你的对象是子类的类型,并按此类型引用。在本文示例中,PremiumCoffeeMachine 对象按 PremiumCoffeeMachine 引用。你的对象是子类的类型,但按超类引用。在 CoffeeMachine 示例中,PremiumCoffeeMachine 对象按 BasicCoffeeMachine 引用。
607. What is method overloading?
什么是方法重载?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6b63 | 官方: 否 | 付费: 否
答案:
One of the most helpful characteristics of an Object-Oriented Language is method overloading in Java. It allows for several methods with the same name in a class. The only difference between these methods is the list of arguments that are supplied through them. With a simple example, it is easy to understand. A class addition contains two add() methods, one with two integer parameters, int a and int b, and the other with three integer parameters, int a, int b, and int c. As a result, the add() function is overloaded. The method that is called will be determined by the number of arguments given in the method-calling statement. For example, add(20,30) will invoke the add() function with two parameters, but add(10,20,30) will invoke the add method with three parameters.
Java 中方法重载是面向对象语言最有用的特性之一。它允许一个类中有多个同名方法。这些方法之间的唯一区别是传递给它们的参数列表。通过一个简单示例可以轻松理解。一个类 addition 包含两个 add() 方法,一个带两个整数参数 int a 和 int b,另一个带三个整数参数 int a、int b 和 int c。因此,add() 函数被重载了。被调用的方法取决于方法调用语句中给出的参数数量。例如,add(20,30) 将调用带两个参数的 add() 函数,而 add(10,20,30) 将调用带三个参数的 add 方法。
Optum Interview Preparation
608. Why do you want to work at Optum?
你为什么想在 Optum 工作?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6bab | 官方: 否 | 付费: 否
答案:
In terms of working for an organization, UHG is right up there with the best of them. This is an employee-friendly environment with a lot of activities to improve employees' technical and soft abilities. You will get the opportunity to work with cutting-edge technology as they modernize outdated tech stacks. It is a good place to start a career. You will be working on a variety of new projects. It will also give you the ability to have complete ownership of the product that you are delivering.
就为组织工作而言,UHG 与最佳雇主并驾齐驱。这是一个员工友好的环境,有很多活动来提升员工的技术和软技能。你将有机会使用尖端技术,因为他们正在现代化过时的技术栈。这是开始职业生涯的好地方。你将参与各种新项目。这也将使你能够完全拥有你正在交付的产品。
609. What is the salary for freshers in Optum?
Optum 应届生的薪资是多少?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6bae | 官方: 否 | 付费: 否
答案:
The average compensation for an Optum Software Engineer in India is 9.9 Lakhs for those with less than one to six years of experience. At Optum, the compensation range for the position of Software Engineer is between 6 and 15 Lakhs.
在印度,Optum 软件工程师的平均薪资为 9.9 Lakhs,适用于经验少于一年到六年的员工。在 Optum,软件工程师职位的薪资范围在 6 到 15 Lakhs 之间。
610. How long is the Interview Process at Optum?
Optum 的面试流程需要多长时间?
- 知识点: 其他/未分类 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6bb1 | 官方: 否 | 付费: 否
答案:
The duration of the Optum interview procedure might range from three weeks to three months . The level of the position, everyone's schedule, and other variables all influence the timetable.
Optum 面试流程的持续时间可能从三周到三个月不等。职位的级别、每个人的日程安排以及其他变量都会影响时间表。
611. Can you tell me the default IP address, as well as the default login and password, for Palo Alto Firewall's administration port?
你能告诉我 Palo Alto 防火墙管理端口的默认 IP 地址以及默认登录名和密码吗?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d4f | 官方: 否 | 付费: 否
答案:
In the Palo Alto Firewall, the administration port's default IP address is 192.168.1.1. The username is "admin," and the password is "admin."
在 Palo Alto 防火墙中,管理端口的默认 IP 地址是192.168.1.1。用户名是“admin”,密码是“admin”。
612. What exactly is a wildfire? Could you give a basic description of how wildfire works?
什么是 WildFire?你能给出 WildFire 工作原理的基本描述吗?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d52 | 官方: 否 | 付费: 否
答案:
Finding solutions and analysing malware to protect a network from potential attacks is a time-consuming procedure. Wildfire is a cloud-based malware detection service that aids in the detection of unknown files or threats created by attackers. Wildfire provides enterprises with immediate protection and danger intelligence.
寻找解决方案和分析恶意软件以保护网络免受潜在攻击是一个耗时的过程。WildFire 是一种基于云的恶意软件检测服务,有助于检测攻击者创建的未知文件或威胁。WildFire 为企业提供即时保护和威胁情报。
The WildFire Analysis Environment detects and blocks previously unknown malware by creating signatures that Palo Alto Networks firewalls can employ to detect and stop it. When a Palo Alto Networks firewall identifies an unknown sample (a file or a link included in an email), it can send the sample to WildFire for analysis. WildFire classifies a sample as benign, grayware, phishing, or malicious based on the traits, behaviours, and activities it exhibits when examined and performed in the WildFire sandbox. WildFire then creates signatures to recognise the freshly identified malware and makes the most recent signatures available globally in real-time for retrieval. The malware originally detected by a single Palo Alto Networks firewall can subsequently be automatically blocked by all Palo Alto Networks firewalls by comparing incoming samples against these signatures. From the time where a user downloads a file containing an advanced VM-aware payload until the point where WildFire develops a signature package utilised by Palo Alto Networks firewalls to protect against future malware exposure, the following sequence explains the WildFire process lifecycle.
WildFire 分析环境通过创建签名来检测和阻止以前未知的恶意软件,Palo Alto Networks 防火墙可以利用这些签名来检测和阻止它。当 Palo Alto Networks 防火墙识别出未知样本(文件或电子邮件中包含的链接)时,它可以将样本发送到 WildFire 进行分析。WildFire 根据在 WildFire 沙盒中检查和执行时表现出的特征、行为和活动,将样本分类为良性、灰色软件、钓鱼或恶意。然后,WildFire 创建签名以识别新发现的恶意软件,并实时全球提供最新签名以供检索。最初由单个 Palo Alto Networks 防火墙检测到的恶意软件,随后可通过比较传入样本与这些签名,自动被所有 Palo Alto Networks 防火墙阻止。从用户下载包含高级 VM 感知负载的文件,到 WildFire 制定由 Palo Alto Networks 防火墙使用的签名包以防范未来恶意软件暴露,以下序列解释了 WildFire 过程的生命周期。
613. What is the maximum number of zones that an interface can be a part of?
一个接口可以属于的最大区域数量是多少?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d55 | 官方: 否 | 付费: 否
答案:
Security zones on the firewall are a logical approach to arrange physical and virtual interfaces in order to restrict and log traffic that passes through certain network interfaces. Before an interface on the firewall can process traffic, it must be allocated to a security zone. Multiple interfaces of the same type (such as tap, layer 2, or layer 3 interfaces) can be allocated to a zone, but an interface can only belong to one zone.
防火墙上的安全区域是一种逻辑方法,用于组织物理和虚拟接口,以便限制和记录通过特定网络接口的流量。在防火墙上的接口可以处理流量之前,它必须被分配到安全区域。相同类型的多个接口(如分流、第2层或第3层接口)可以分配到同一区域,但一个接口只能属于一个区域。
614. Could you clarify the various states of the HA Firewall?
你能澄清 HA 防火墙的各种状态吗?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d58 | 官方: 否 | 付费: 否
答案:
The various states of the HA firewall are: - Initial
HA 防火墙的各种状态包括: - 初始
- Passive
- Active
- Active-primary
- Active-secondary
- Tentative
- Non-functional
- Suspended
615. How to perform policy match and connectivity tests from the web interface?
如何从 Web 界面执行策略匹配和连接测试?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d5b | 官方: 否 | 付费: 否
答案:
Instead of using the CLI, you can use the web interface to execute policy match and connectivity checks for firewalls in PAN-OS 9.0. You can simply validate traffic and connectivity to ensure that policy rules are matching policy rules as expected to allow or reject traffic and that firewalls can connect to network resources and external services like WildFire, Log Collectors, and the Update Server.
除了使用 CLI,你还可以使用 Web 界面在 PAN-OS 9.0 中执行防火墙的策略匹配和连接检查。你可以轻松验证流量和连接性,以确保策略规则按预期匹配以允许或拒绝流量,并确保防火墙可以连接到网络资源和外部服务(如 WildFire、日志收集器和更新服务器)。
Go to the firewall's web interface and log in. 2. To execute a policy match or connectivity test, go to DeviceTroubleshooting. 3. To run the policy match test, fill in the required information. 4. Conduct out the policy matching test. 5. To get the Result Details for the policy rule that matches the test criteria, click the policy rule Test Result.
- 转到防火墙的 Web 界面并登录。 2. 要执行策略匹配或连接测试,请转到设备故障排除。 3. 要运行策略匹配测试,请填写所需信息。 4. 执行策略匹配测试。 5. 要获取与测试条件匹配的策略规则的详细结果,请点击策略规则测试结果。
616. How does an APP-ID work?
APP-ID 是如何工作的?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d5e | 官方: 否 | 付费: 否
答案:
App-ID is used to identify applications on your network in the following way: - Traffic is compared to policy to see if it is authorised on the network.
App-ID 用于按以下方式识别网络上的应用程序: - 流量与策略进行比较以查看它是否在网络上被授权。
- The application is then identified by applying signatures to approved traffic based on application traits and transaction characteristics that are unique to the application. The signature also determines whether or not the application is running on its default port. If the traffic is allowed by policy, it is checked for threats and studied further so that the application may be identified.
- If App-ID detects encryption (SSL or SSH) and a Decryption policy rule is in place, the session is decrypted and application signatures are applied again to the decrypted flow.
- Additional context-based signatures are applied to decoders for well-known protocols in order to detect other apps that may be tunnelling within the protocol (for example, Yahoo! Instant Messenger via HTTP). Decoders ensure that traffic follows protocol standards, and they make NAT traversal and dynamic pinhole opening easier for applications like SIP and FTP.
Heuristics or behavioural analysis may be used to establish the identity of apps that are exceptionally evasive and cannot be identified by advanced signature and protocol analysis.
When an application is found, the policy check decides whether to block it or allow it to operate while screening for risks, inspecting for illegal file transfers and data patterns, or shaping it using QoS.当发现应用程序时,策略检查决定是否阻止它或允许它在筛选风险、检查非法文件传输和数据模式或使用 QoS 调整它的同时运行。
617. Is the firewall at Palo Alto stateful?
Palo Alto 防火墙是有状态的(stateful)吗?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d61 | 官方: 否 | 付费: 否
答案:
Yes, because all firewall traffic can be routed through the Palo Alto system and then matched against a session. More importantly, each session should be compared against a security policy set by the firewall.
是的,因为所有防火墙流量都可以通过 Palo Alto 系统路由,然后与会话(session)进行匹配。更重要的是,每个会话都应针对防火墙设置的安全策略进行比较。
618. In Palo Alto, what is the difference between virtual routers and virtual systems?
在 Palo Alto 中,虚拟路由器和虚拟系统有什么区别?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d64 | 官方: 否 | 付费: 否
答案:
Virtual routers: - A virtual router is a Layer 3 routing mechanism built into a firewall. The firewall can use virtual routers to gain routes to other subnets, and you can manually establish static routes or participate in one or more Layer 3 routing protocols (dynamic routes).
虚拟路由器:- 虚拟路由器是内置于防火墙中的第 3 层路由机制。防火墙可以使用虚拟路由器获取到其他子网的路由,你可以手动建立静态路由,或参与一个或多个第 3 层路由协议(动态路由)。
You can also establish numerous virtual routers (VR), each with its own set of routes that are not shared among them, allowing you to configure various routing behaviours for distinct interfaces.Numerous VSYS can share the same VR, and multiple VSYS can have multiple VRs.
Virtual systems: - Virtual systems are distinct, logical firewall instances within a single physical Palo Alto Networks firewall. A virtual system is made up of physical and logical interfaces and subinterfaces, virtual routers, and security zones (including VLANs and virtual wires). Each virtual system's deployment mode (any combination of virtual wire, Layer 2, or Layer 3) is selected by you.虚拟系统:- 虚拟系统是单个物理 Palo Alto Networks 防火墙内独特、逻辑的防火墙实例。虚拟系统由物理和逻辑接口及子接口、虚拟路由器以及安全区域(包括 VLAN 和虚拟线缆)组成。每个虚拟系统的部署模式(虚拟线缆、第 2 层或第 3 层的任意组合)由你选择。
- Instead of having several firewalls, controlled service providers and organisations should employ a single pair of firewalls (for high availability) and allow virtual environments to run on them. Each virtual system can act as its own firewall, with its own security policy, interfaces, and administrators. This allows you to segment the management of all policies, reporting, and visibility capabilities provided by the firewall. You can logically separate physical networks by enabling virtual systems on your firewall.
619. What is the purpose of Palo Alto AutoFocus?
Palo Alto AutoFocus 的作用是什么?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d6b | 官方: 否 | 付费: 否
答案:
Palo Alto Auto Focus is a Palo Alto service that may detect major attacks and respond appropriately without the need for additional resources. The service is a cloud-based threat intelligence service.
Palo Alto AutoFocus 是 Palo Alto 的一项服务,无需额外资源即可检测重大攻击并作出适当响应。该服务是一种基于云的情报服务。
WildFireTM, the PAN-DB URL Filtering database, Unit 42, and third-party feeds are all used by AutoFocus (including both closed and open-source intelligence). After that, AutoFocus makes the data searchable and layers it with statistics that both emphasise pervasive malware and reveal malware linkages.
WildFireTM、PAN-DB URL 过滤数据库、Unit 42 以及第三方馈送(包括闭源和开源情报)都被 AutoFocus 所使用。之后,AutoFocus 使数据可搜索,并附加统计数据,这些统计数据既强调普遍存在的恶意软件,又揭示恶意软件的关联性。
Benefits: - Get unprecedented visibility into attacks by combining data from the industry's largest network, endpoint, and cloud intelligence sources.
优势:- 通过整合来自业界最大网络、端点和云情报源的数据,获得前所未有的攻击可见性。
- Every threat will be enriched with the most detailed context from world-renowned Unit 42 threat researchers.
- With a unique threat feed and agile APIs, analysts can get a significant time advantage with intel embedded in any tool.
620. What are the different failover scenarios?
不同的故障转移(failover)场景有哪些?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d6e | 官方: 否 | 付费: 否
答案:
The event is known as a failover when one firewall fails and the peer takes over the role of safeguarding traffic. When a monitored metric on a firewall in the HA pair fails, for example, a failover is initiated.
当一台防火墙发生故障且对等设备接管保护流量的角色时,该事件称为故障转移。例如,当 HA 对中的防火墙上的某个受监控指标失败时,就会触发故障转移。
The scenarios that explain the failure over triggering are as follows: - Hello messages and heartbeat polling:
解释故障转移触发的场景如下:- 问候消息和心跳轮询:
Hello messages and heartbeats are used by the firewalls to ensure that the peer firewall is responsive and working. To validate the state of the firewall, hello messages are delivered from one peer to the other at the configured Hello Interval. The heartbeat is an ICMP ping over the control link to the HA peer, to which the peer responds to confirm that the firewalls are connected and responding. The heartbeat interval is 1000 milliseconds by default. Every 1000 milliseconds, a ping is issued, and if three consecutive heartbeat losses occur, a failover happens. - Link monitoring:The monitored physical interfaces are organised into a link group, and their status (link up or link down) is tracked. One or more physical interfaces can be found in a link group. When any or all of the interfaces in a group fail, a firewall failure occurs. The default behaviour is that if any link in the link group fails, the firewall will set the HA status to non-functional (or tentative in active/active mode) to signify a monitored object failure.
防火墙使用问候消息和心跳来确保对端防火墙响应正常且工作正常。为验证防火墙状态,问候消息按配置的问候间隔从一端传递到另一端。心跳是通过控制链路向HA对端发送的ICMP ping,对端响应以确认防火墙已连接并响应。心跳间隔默认为1000毫秒。每1000毫秒发出一次ping,如果连续丢失三次心跳,则发生故障切换。 - 链路监控:被监控的物理接口组织成链路组,并跟踪其状态(链路开启或链路关闭)。一个链路组中可以包含一个或多个物理接口。当组中的所有或任一接口失败时,就会发生防火墙故障。默认行为是,如果链路组中任何链路失败,防火墙会将HA状态设置为不可用(或在主动/主动模式下为暂定),以表示被监控对象失败。
Path monitoring:
Path Monitoring keeps track of the whole network path to mission-critical IP addresses. Pings using the ICMP protocol are used to check if an IP address is reachable. Ping intervals are set to 200ms by default. When 10 consecutive pings (the default value) fail, an IP address is declared unreachable, and a firewall failure occurs when any or all of the monitored IP addresses become unreachable. The default behaviour is that if any of the IP addresses becomes unreachable, the firewall will set the HA state to non-functional (or tentative in active/active mode) to signify a monitored object failure. A failover happens when the administrator suspends the firewall or when preemption occurs, in addition to the above failover triggers.路径监控跟踪到关键任务IP地址的整个网络路径。使用ICMP协议的Ping来检查IP地址是否可达。Ping间隔默认设置为200毫秒。当连续10次ping(默认值)失败时,IP地址被声明为不可达,当所有或任一被监控的IP地址变得不可达时,就会发生防火墙故障。默认行为是,如果任何IP地址变得不可达,防火墙会将HA状态设置为不可用(或在主动/主动模式下为暂定),以表示被监控对象失败。除了上述故障切换触发条件外,当管理员暂停防火墙或发生抢占时,也会发生故障切换。
621. In Palo Alto, what is a U-turn NAT?
在Palo Alto中,什么是U-turn NAT?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d71 | 官方: 否 | 付费: 否
答案:
In Palo Alto, the U-turn NAT is just a logical path employed in the networking system. The user should be able to access the internal DMZ servers using this NAT profile. You should utilise the external IP address of the respective servers to accomplish this.
在Palo Alto中,U-turn NAT只是网络系统中采用的一条逻辑路径。用户应该能够使用此NAT配置文件访问内部DMZ服务器。您应使用相应服务器的外部IP地址来实现这一点。
622. Explain Active/passive and Active/Active modes in Palo Alto?
解释Palo Alto中的主动/被动和主动/主动模式?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d74 | 官方: 否 | 付费: 否
答案:
- Active/Passive:One firewall manages traffic actively, while the other is synced and ready to switch to active mode if one fails. Both firewalls use identical configuration parameters in this mode, and one actively handles traffic until a path, connection, system, or network fails. When the active firewall fails, the passive firewall easily shifts to the active state and maintains network security by enforcing the same regulations. In virtual wire, Layer 2, and Layer 3 deployments, active/passive HA is supported.
Active/Active:
Both firewalls in the pair are active and processing traffic, and they manage session setup and ownership in a synchronised manner. Both firewalls keep their own session and routing tables and synchronise with one another. In virtual wire and Layer 3 deployments, active/active HA is supported.对中的两个防火墙都处于主动状态并处理流量,它们以同步方式管理会话建立和会话所有权。两个防火墙都维护自己的会话和路由表,并相互同步。在虚拟线路和三层部署中,支持主动/主动HA。
We should consider the following distinctions when selecting whether to employ active/passive or active/active mode:
在选择采用主动/被动还是主动/主动模式时,我们应考虑以下区别:
It is substantially easier to troubleshoot routing and traffic flow issues in active/passive mode due to its simplicity of design. Layer 2 deployment is supported in active/passive mode but not in active/active mode.
在主动/被动模式下,由于其设计简单,排查路由和流量流问题要容易得多。主动/被动模式支持二层部署,但主动/主动模式不支持。
Advanced design concepts are required for active/active mode, which might result in more complicated networks. Activating networking protocols on both firewalls, duplicating NAT pools, and deploying floating IP addresses, depending on how you implement active/active HA, may necessitate additional settings. Because both firewalls are actively processing traffic, they execute Layer 7 content inspection using the notions of session owner and session setup. If each firewall requires its own routing instances and you need full, real-time redundancy from both firewalls all of the time, active/active mode is advised. Because both firewalls are actively processing traffic, active/active mode has a faster failover and can handle peak traffic flows better than active/passive mode.
主动/主动模式需要高级设计概念,这可能导致网络更加复杂。根据您如何实施主动/主动HA,在两个防火墙上启用网络协议、复制NAT池以及部署浮动IP地址可能需要额外的设置。因为两个防火墙都在积极处理流量,它们使用会话所有者和会话建立的概念执行第七层内容检查。如果每个防火墙需要自己的路由实例,并且您始终需要两个防火墙提供完整、实时的冗余,则建议使用主动/主动模式。由于两个防火墙都在积极处理流量,主动/主动模式具有更快的故障切换速度,并能比主动/被动模式更好地处理峰值流量。
623. What is a zone protection profile?
什么是区域保护配置文件?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d77 | 官方: 否 | 付费: 否
答案:
The Zone protection profile will provide you with total protection against attacks such as floods, reconnaissance, and packet-based attacks. Flood attacks can be of several types, including SYN, ICMP, and UDP. You'll be able to guard against port and host sweeps using the reconnaissance protections. The packet safeguards assist you in defending against big ICMP and ICMP fragment attacks.
区域保护配置文件将为您提供针对洪水攻击、侦察攻击和基于数据包的攻击的全面保护。洪水攻击可以有多种类型,包括SYN、ICMP和UDP。您将能够使用侦察保护来防范端口和主机扫描。数据包保护有助于您防御大型ICMP和ICMP分片攻击。
It is intended to provide broad-based security at the ingress zone (the zone where traffic enters the firewall), rather than protecting a specific end host or traffic heading to a specific destination zone. A zone can have just one zone protection profile attached to it. Configure a DoS Protection policy (Policies > DoS Protection) to match on a specific zone, interface, IP address, or user to enhance zone protection capabilities on the firewall.
其旨在在入口区域(流量进入防火墙的区域)提供广谱安全,而不是保护特定的终端主机或流向特定目标区域的流量。一个区域只能附加一个区域保护配置文件。配置DoS保护策略(策略> DoS保护)以匹配特定区域、接口、IP地址或用户,以增强防火墙上的区域保护功能。
Because zone protection is based on new connections per second (cps), not packets per second, it is only implemented when there is no session match for the packet (pps). The zone protection option will be bypassed if the packet matches an existing session.
由于区域保护基于每秒新建连接数(cps),而不是每秒数据包数(pps),因此仅在数据包没有会话匹配时实施。如果数据包与现有会话匹配,则将绕过区域保护选项。
624. What is the Application Command Centre (ACC)?
什么是应用程序命令中心(ACC)?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d7a | 官方: 否 | 付费: 否
答案:
The Application Command Centre (ACC) provides an interactive graphical summary of the applications, users, URLs, threats, and information traversing your network. The firewall logs are used by the ACC to provide visibility into traffic patterns and actionable threat information. The ACC interface offers a tabbed view of network activity, threat activity, and blocked activity, with relevant widgets on each tab for better network traffic visualisation. The graphical representation enables you to engage with the data and visualise the connections between network events, allowing you to spot abnormalities and improve your network security rules. You can also add a custom tab and include widgets that allow you to drill down into the information that is most important to you for a more personalised picture of your network.
应用程序命令中心(ACC)提供了遍历您网络的应用、用户、URL、威胁和信息的交互式图形摘要。防火墙日志被ACC用于提供流量模式的可视性和可操作的威胁信息。ACC界面提供网络活动、威胁活动和已阻止活动的选项卡视图,每个选项卡上有相关的小组件,以便更好地可视化网络流量。图形表示使您能够与数据交互并可视化网络事件之间的联系,使您能够发现异常并改进网络安全规则。您还可以添加自定义选项卡并包含允许您深入挖掘最相关信息的组件,以获得更个性化的网络视图。
625. What is WAF (Web Application Firewall)?
什么是WAF(Web应用防火墙)?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d7d | 官方: 否 | 付费: 否
答案:
The Web Application Firewall (WAF) is the acronym for Web Application Firewall. WAF's main purpose is to keep track of web applications and improve their security and functionality. It protects the web application by filtering traffic between the internet and the application.
Web应用防火墙(WAF)是Web应用防火墙的缩写。WAF的主要目的是跟踪Web应用并提高其安全性和功能性。它通过过滤互联网与应用之间的流量来保护Web应用。
Web Application Firewalls include the following key features: - Designed to compensate for insecure coding techniques - only enterprises who employ web apps and are concerned about the security of their code should purchase a WAF.
Web应用防火墙包括以下关键特性: - 旨在弥补不安全编码技术的不足 - 只有那些采用Web应用并关注其代码安全性的企业才应购买WAF。
- Highly customised for each environment — examining how the web application should behave and intervening if it does not.
626. In Palo Alto, what do HA, HA1, and HA2 mean?
在Palo Alto中,HA、HA1和HA2分别是什么意思?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d80 | 官方: 否 | 付费: 否
答案:
- HA stands for High Availability, which is a Palo Alto deployment model. HA is used in a network to prevent a single point of failure. It includes two firewalls that are set up in a synchronised fashion. Security features are enforced through a different firewall if one fails. The company will be able to continue operating without interruption as a result of this.
- There are two different ports in HA: HA1 and HA2. HA1 is referred to as a control link, while HA 2 is referred to as a datalink. These ports are used to synchronise data and keep track of the current state.
- Hellos, heartbeats, and HA state information are exchanged across the HA1 link, as well as management plane sync for routing and User-ID information. This connection is often used by firewalls to synchronise configuration updates with their peers. The HA1 link is a Layer 3 link that necessitates the use of an IP address.
- Between firewalls in a HA pair, the HA2 link is used to synchronise sessions, forwarding tables, IPSec security associations, and ARP tables. Except for the HA2 keep-alive, data flow on the HA2 connection is always unidirectional; it flows from the active or active-primary firewall to the passive or active-secondary firewall. The HA2 link is a Layer 2 link that defaults to ether type 0x7261.
627. What is Palo Alto's architectural style?
Palo Alto的架构风格是什么?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: system-design
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d89 | 官方: 否 | 付费: 否
答案:
Palo Alto Networks' next-generation firewalls are built on single-pass parallel processing (SP3) architecture that provides high-throughput, low-latency network protection while also including cutting-edge features and technologies.
Palo Alto Networks的下一代防火墙基于单遍并行处理(SP3)架构,该架构提供高吞吐量、低延迟的网络保护,同时还包含尖端特性和技术。
Palo Alto Networks' SP3 architecture, which combines two complementing components, tackles the performance concerns that afflict today's security infrastructure. The components are: - Single Pass software.
Palo Alto Networks的SP3架构结合了两个互补组件,解决了困扰当今安全基础设施的性能问题。这些组件包括: - 单遍软件。
Parallel Processing hardware.
As a result, today's high-performance networks have the ideal blend of raw throughput, transaction processing, and network security.因此,当今高性能网络拥有原始吞吐量、事务处理和网络安全的理想组合。
628. What exactly is an APP-ID?
APP-ID到底是什么?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d8c | 官方: 否 | 付费: 否
答案:
App-ID is the abbreviated name for application identifications. This is one of Palo Alto's most important elements. App-ID's primary tasks include recognising apps and traversing firewalls independently.
App-ID是应用识别的缩写名称。这是Palo Alto最重要的元素之一。App-ID的主要任务包括识别应用并独立穿越防火墙。
App-ID allows you to see and learn about the applications on your network, including how they work, their behavioural features, and their risk level. App-ID, a patented traffic classification technology exclusive to Palo Alto Networks firewalls, determines what an application is regardless of its port, protocol, encryption (SSH or SSL), or any other invasive approach. To effectively identify apps, it uses a combination of classification mechanisms—application signatures, application protocol decoding, and heuristics—on your network traffic stream. This enables for more precise management, such as permitting just sanctioned Office 365 accounts or allowing Slack for instant messaging but not file transmission.
App-ID允许你查看并了解网络上的应用,包括它们的工作方式、行为特征和风险级别。App-ID是Palo Alto Networks防火墙独有的专利流量分类技术,无论应用使用何种端口、协议、加密(SSH或SSL)或任何其他侵入性方法,都能确定其身份。为了有效识别应用,它结合了分类机制——应用签名、应用协议解码和启发式方法——应用于网络流量流。这能够实现更精确的管理,例如仅允许经授权的Office 365账户,或允许Slack用于即时消息但不用于文件传输。
629. In Palo Alto, identify the various deployment modes. ?
在Palo Alto中,识别各种部署模式。
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d8f | 官方: 否 | 付费: 否
答案:
There are four deployment models to choose from: - Tap mode deployment option
有四种部署模式可供选择: - 分流模式部署选项
- Virtual (V-Wire) Deployment option
- Layer 2 deployment option
- Layer 3 deployment option
Tap mode deployment option:
With the use of a tap or switch SPAN/mirror port, users can observe any form of traffic flow throughout the networking system. This deployment option has the advantage of allowing enterprises to closely monitor traffic to their servers or networks without requiring any network infrastructure upgrades.通过使用分流或交换机SPAN/镜像端口,用户可以观察整个网络系统中任何形式的流量流。此部署选项的优势在于,企业无需任何网络基础设施升级即可密切监控到其服务器或网络的流量。
It's critical to configure the correct SPAN source and SPAN destination ports, as well as enable Tap mode on the Firewall while configuring SPAN. Although tap mode provides visibility of the application, user, and content, we must keep in mind that the firewall is unable to manage traffic in this mode because no security rules can be enforced. Tap mode just adds visibility to the dashboard's ACC tab. The catch is that the tap interface needs to be allocated to a security zone.
在配置SPAN时,正确配置SPAN源和SPAN目标端口,并在防火墙上启用分流模式至关重要。尽管分流模式提供了对应用、用户和内容的可见性,但我们必须记住,防火墙在此模式下无法管理流量,因为无法执行任何安全规则。分流模式仅向仪表板的ACC选项卡添加可见性。关键是,分流接口需要分配到安全区域。
- Virtual (V-Wire) Deployment option:
The firewall system is installed passively on any network segment using this deployment model, which combines two interfaces. Engineers can monitor and control traffic across the link with V-Wire deployment choices, which overcomes the restrictions of TAP mode deployment. App-ID, User-ID, Content-ID, NAT, and decryption are all supported via the Virtual Wire interface.
使用此部署模型,防火墙系统被动安装在网络段的任何位置,该模型结合了两个接口。工程师可以通过V-Wire部署选项监控和控制跨链路流量,这克服了TAP模式部署的限制。App-ID、User-ID、Content-ID、NAT和加密解密均通过虚拟线接口支持。
- Layer 2 deployment option:
Multiple networking interfaces will be configured into a "virtual-switch" or VLAN mode in Layer 2 mode. The firewall is set in Layer 2 deployment mode to switch between two or more network segments. Traffic passing via the firewall is analyzed according to policies, enhancing security and visibility within the internal network.
在第二层模式中,多个网络接口将被配置为“虚拟交换机”或VLAN模式。防火墙设置为第二层部署模式,用于在两个或多个网络段之间进行交换。通过防火墙的流量根据策略进行分析,从而增强内部网络的安全性和可见性。
The firewall interfaces can support Access or Trunk Links (802.1Q trunking) in this mode, but they are not part of the Spanning Tree topology. Any BPDUs received on the firewall interfaces are routed without being processed to the adjoining Layer 2 switch. A default Gateway, which is commonly a Layer 3 switch that supports InterVLAN routing, a Firewall security appliance, or even a Router-on-a-Stick design, can route traffic across VLAN networks or other networks.
防火墙接口在此模式下可支持接入或中继链路(802.1Q 中继),但它们不属于生成树拓扑的一部分。防火墙接口上收到的任何 BPDU 都会被路由到相邻的第二层交换机而不进行处理。默认网关通常是支持 VLAN 间路由的第三层交换机、防火墙安全设备,甚至可以是单臂路由器设计,它可以在 VLAN 网络或其他网络之间路由流量。
- Layer 3 deployment option:
The Palo Alto firewall routes allow traffic to flow between various interfaces in this layer 3 deployments. The IP address should be added to each interface by the user.
Palo Alto 防火墙路由允许流量在此第三层部署模式中的各个接口之间流动。用户应为每个接口添加 IP 地址。
Layer 3 deployment mode is a common configuration. The firewall directs traffic between many interfaces in this mode, each of which has its own IP address and security zone. The Firewall interfaces can also be set up to get an IP address from a DHCP server and be used to manage the security appliance.
第三层部署模式是一种常见配置。在此模式下,防火墙在多个接口之间引导流量,每个接口都有自己的 IP 地址和安全区域。防火墙接口还可以设置为从 DHCP 服务器获取 IP 地址,并用于管理安全设备。
The diagram above depicts a typical Layer 3 deployment scenario in which the Firewall routes and regulates traffic between three IP networks. All traffic passing through the Firewall is reviewed and allowed or prohibited according to the security policies established, just like in previous setup methods.
上图描绘了一个典型的第三层部署场景,其中防火墙在三个 IP 网络之间路由和调节流量。与之前的设置方法一样,所有通过防火墙的流量都会根据已建立的安全策略进行审查,并允许或禁止。
630. What arethe advantages of Panorama in Palo Alto?
Palo Alto 中 Panorama 的优势有哪些?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d95 | 官方: 否 | 付费: 否
答案:
The following are a few of Palo Alto's panorama benefits: - Distributed administrations are available, allowing you to control and delegate evaluation of Palo Alto firewall configurations.
以下是 Palo Alto Panorama 的一些优势: - 提供分布式管理,允许您控制和委派 Palo Alto 防火墙配置的评估。
- Deployment and a centralised configuration system are provided.
- Supports logging or aggregated management for reporting and analysis with central oversight.
- View a graphical representation of the network's apps, their users, and the security implications.
- Analyze, evaluate, and report on network traffic, security issues, and administrative changes from a centralised location.
631. What are the possibilities for forwarding logs messages on the Palo Alto Firewall?
在 Palo Alto 防火墙上转发日志消息有哪些可能性?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d99 | 官方: 否 | 付费: 否
答案:
The following log forwarding options are supported by Palo Alto Networks firewalls and Panorama. Consider the logging capacity of your Panorama Models and Determine Panorama Log Storage Requirements before selecting an option. - Logs from firewalls are forwarded to Panorama, while logs from Panorama are forwarded to external services: This option is ideal for installations where the bandwidth between firewalls and external services is insufficient to support the logging rate, which is common when the connections are remote. By offloading some processing to Panorama, this setup increases firewall performance.
Palo Alto Networks 防火墙和 Panorama 支持以下日志转发选项。在选择选项之前,请考虑您的 Panorama 型号的日志容量,并确定 Panorama 日志存储要求。 - 将防火墙的日志转发到 Panorama,而将 Panorama 的日志转发到外部服务:此选项适用于防火墙与外部服务之间的带宽不足以支持日志记录速率的环境,这在连接为远程时很常见。通过将部分处理任务卸载到 Panorama,此设置可提高防火墙性能。
- Panorama and external services receive logs from firewalls at the same time: Panorama and the external services are both endpoints of distinct log forwarding flows in this arrangement; the firewalls do not rely on Panorama to pass logs to external services. This setting is suitable for installations where the connections between firewalls and external services have enough bandwidth to support the logging rate, which is common when the connections are local.
632. What is the procedure for adding a licence to the Palo Alto Firewall?
为 Palo Alto 防火墙添加许可证的流程是什么?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d9c | 官方: 否 | 付费: 否
答案:
You must first activate the licences for each of the services you purchased before you can begin utilising your firewall to safeguard network traffic. - Locate the licence activation codes that you purchased. Palo Alto Networks customer care should have sent you an email with the activation codes associated with each subscription when you purchased them. If you can't find this email, you'll need to contact Customer Support to get your activation codes before continuing.
在开始使用防火墙保护网络流量之前,您必须首先为所购买的每项服务激活许可证。 - 找到您购买的许可证激活码。Palo Alto Networks 客户服务应在您购买时通过电子邮件将与每个订阅关联的激活码发送给您。如果找不到这封电子邮件,您需要联系客户支持以获取激活码,然后再继续。
You have to activate your Support subscription. If you don't have a valid Support licence, you won't be able to upgrade your PAN-OS software.
Select DeviceSupport after logging in to the web portal. Select Activate support with authorisation code from the drop-down menu. Click OK after entering your Authorization Code. - Activate each licence you've bought. Choose Device>Licences, then activate your licences and subscriptions using one of the methods below:登录 Web 门户后,选择 DeviceSupport。从下拉菜单中选择用授权码激活支持。输入授权码后点击 OK。 - 激活您购买的每个许可证。选择 Device>Licences,然后使用以下方法之一激活您的许可证和订阅:
License keys can be obtained via the licence server. Use the authorisation code to activate the functionality. Upload the licence key manually. - Check to see if the licence has been activated.Verify that the licence has been successfully activated on the Device>Licences page. After activating the WildFire licence, for example, you should see that it is valid:
许可证密钥可通过许可证服务器获取。使用授权码激活功能。手动上传许可证密钥。 - 检查许可证是否已激活。在 Device>Licences 页面上验证许可证是否已成功激活。例如,激活 WildFire 许可证后,您应看到它有效:- (For WildFire subscriptions only) To complete the WildFire subscription activation, do a commit.A commit is required for the firewall to begin passing advanced file types after establishing a WildFire subscription.
633. What is GlobalProtect in Palo Alto?
Palo Alto 中的 GlobalProtect 是什么?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6d9f | 官方: 否 | 付费: 否
答案:
GlobalProtectTM is an application that runs on your endpoint (desktop computer, laptop, tablet, or smartphone) to safeguard you by employing the same security standards that protect important corporate network resources. GlobalProtectTM encrypts your intranet traffic and allows you to connect to your corporate network from anywhere in the world to use your company's resources.
GlobalProtectTM 是运行在终端(台式电脑、笔记本电脑、平板电脑或智能手机)上的应用程序,通过采用保护重要企业网络资源的相同安全标准来保护您。GlobalProtectTM 对您的内网流量进行加密,并允许您从世界任何地方连接到企业网络以使用公司资源。
634. Mention the various types of linkages used to establish HA or the HA introduction?
用于建立 HA 或 HA 介绍的各种链路类型有哪些?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6da6 | 官方: 否 | 付费: 否
答案:
To establish HA or HA introduction, there are four sorts of linkages: - HA1 or control link
要建立 HA 或 HA 介绍,有四种类型的链路: - HA1 或控制链路
- HA2 or Datalink
- Back-up links
- Packet forwarding links
635. What are Backup Links?
什么是备份链路?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6da9 | 官方: 否 | 付费: 否
答案:
Back-up links ensure that the HA1 and HA2 links are redundant. When dedicated backup links are not available, in-band ports can be used for backup links for both HA1 and HA2 connections. When configuring backup HA links, keep the following in mind: - The primary and backup HA links' IP addresses must not be in the same range.
备份链路确保HA1和HA2链路具有冗余性。当专用备份链路不可用时,可以使用带内端口作为HA1和HA2连接的备份链路。在配置备份HA链路时,请注意以下几点:- 主HA链路和备份HA链路的IP地址不得位于同一网段。
- Backup HA links must be on a separate subnet than primary HA links.
- On distinct physical ports, HA1-backup and HA2-backup ports must be configured. Ports 28770 and 28260 are used by the HA1-backup link.
- For the HA1-backup link, PA-3200 Series firewalls do not support IPv6; instead, use an IPv4 address.
636. Mention the various port numbers used in HA?
请提及HA中使用的各种端口号?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6dac | 官方: 否 | 付费: 否
答案:
The different port numbers that are used in HA are:
HA中使用的不同端口号如下:
The HA1 control link uses TCP 28769 and TCP 28260 for text communication that is clear between the HA peer firewalls. The HA1 link is a Layer 3 link that necessitates the use of an IP address.
HA1控制链路使用TCP 28769和TCP 28260进行HA对等防火墙之间的明文文本通信。HA1链路是第3层链路,需要使用IP地址。
The HA1 control link uses TCP 28 to communicate securely (SSH over TCP) between HA peer firewalls.
HA1控制链路使用TCP 28在HA对等防火墙之间进行安全通信(基于TCP的SSH)。
For HA1 backup links, use TCP 28770 as a listening port.
对于HA1备份链路,使用TCP 28770作为监听端口。
TCP 28771 is used to backup heartbeats. If you use an in-band port for the HA1 or HA1 backup connections, Palo Alto Networks advises setting heartbeat backup on the MGT interface.
TCP 28771用于备份心跳。如果为HA1或HA1备份连接使用带内端口,Palo Alto Networks建议在MGT接口上设置心跳备份。
IP 99 and UDP 29281 synchronises sessions, forwarding tables, IPSec security associations, and ARP tables between firewalls in a HA pair via the HA2 link. The HA2 link's data flow is constantly constant. Data flows unidirectionally from the active firewall (Active/Passive) or active-primary (Active/Active) to the passive firewall (Active/Passive) or active-secondary (Active/Active) on the HA2 link (save for the HA2 keep-alive). The HA2 link is a Layer 2 link that defaults to ether type 0x7261.
IP 99和UDP 29281通过HA2链路在HA对等防火墙之间同步会话、转发表、IPSec安全关联和ARP表。HA2链路的数据流是持续恒定的。数据在HA2链路上从主动防火墙(主动/被动)或主动-主设备(主动/主动)单向流向被动防火墙(主动/被动)或主动-从设备(主动/主动)(除了HA2保活消息外)。HA2链路是第2层链路,默认以太类型为0x7261。
The HA data connection can also be configured to use IP (protocol number 99) or UDP (port 29281) as the transport, allowing it to cross subnets.
HA数据连接也可以配置为使用IP(协议号99)或UDP(端口29281)作为传输方式,从而允许其跨子网传输。
637. What functionalities does Palo Alto support when it's in virtual wire mode?
Palo Alto在虚拟线缆模式下支持哪些功能?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6daf | 官方: 否 | 付费: 否
答案:
In virtual wire mode, Palo Alto supports a number of features, including App-ID, Decryption, Content-ID, User-ID, and NAT.
在虚拟线缆模式下,Palo Alto支持多种功能,包括App-ID、解密、Content-ID、User-ID和NAT。
638. Can you tell me which virtualization platform fully supports Palo Alto network deployments?
你能告诉我哪种虚拟化平台完全支持Palo Alto网络部署?
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6db2 | 官方: 否 | 付费: 否
答案:
The Palo Alto Networks VM-Series virtualization platform aids Palo Alto Networks deployment significantly. It offers open stack, VMware, Cisco ACI, Amazon Web Services, Google Cloud Platform, and others as public and private cloud computing environments.
Palo Alto Networks VM-Series虚拟化平台显著支持Palo Alto Networks的部署。它提供开放堆栈、VMware、Cisco ACI、Amazon Web Services、Google Cloud Platform等作为公共和私有云计算环境。
639. Can you find out which command is used to show the maximum size of the log file? Give a quick overview of how Panorama handles new logs once the storage limit has been reached.
你能找出用于显示日志文件最大大小的命令吗?请简要概述一旦存储限制达到后,Panorama如何处理新日志。
- 知识点: 其他/未分类 (标签: interviewbit, palo-alto, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Palo Alto Networks
- id: 69b37c0b58d557c902bb6db5 | 官方: 否 | 付费: 否
答案:
The following is the command that is used to see the maximum log file size: show logdb-quota on the system
用于查看最大日志文件大小的命令如下:在系统上运行show logdb-quota。
Panorama automatically deletes old logs and makes room for new records when the log storage limit is reached. The panorama includes an automated feature that can assess the storage limit and, if necessary, eliminate it.
当达到日志存储限制时,Panorama 会自动删除旧日志,为新记录腾出空间。Panorama 包含一项自动化功能,可以评估存储限制,并在必要时消除该限制。
640. How are insertion sort and selection sort different?
插入排序和选择排序有何不同?
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c0f58d557c902bb6f2c | 官方: 否 | 付费: 否
答案:
Both insertion and selection sorting techniques keep two sub-lists, sorted and unsorted, and place one element at a time into the sorted sub-list. Insertion sort takes the currently selected element and places it in the sorted array at the right point while keeping the insertion sort attributes. Selection sort, on the other hand, looks for the smallest element in an unsorted sub-list and replaces it with the current element.
插入排序和选择排序技术都维护两个子列表,即已排序和未排序,并一次将一个元素放入已排序的子列表。插入排序将当前选定的元素放置在已排序数组中的正确位置,同时保留插入排序的属性。另一方面,选择排序在未排序的子列表中寻找最小元素,并将其替换为当前元素。
641. What is the purpose of static methods and variables?
静态方法和变量的目的是什么?
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c0f58d557c902bb6f33 | 官方: 否 | 付费: 否
答案:
The class's static methods or variables are shared by all of the class's objects. The static property belongs to the class, not the object. We don't need to build the object to access the static variables because they're stored in the class area. As a result, static is utilised when we need to create variables or methods that are shared by all of the class's objects.
类的静态方法或变量由该类的所有对象共享。静态属性属于类,而非对象。我们无需构建对象即可访问静态变量,因为它们存储在类区域中。因此,当我们需要创建由类所有对象共享的变量或方法时,会使用静态。
642. What is a classloader?
什么是类加载器?
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c0f58d557c902bb6f37 | 官方: 否 | 付费: 否
答案:
The Classloader subsystem of the JVM is responsible for loading class files. The classloader loads the java programme first whenever we execute it. In Java, there are three built-in classloaders. - Bootstrap ClassLoader: The initial classloader, which is the superclass of Extension classloader, is Bootstrap ClassLoader. It loads the rt.jar file, which includes all Java Standard Edition class files such as java.lang package classes, java.net package classes, java.util package classes, java.io package classes, java.sql package classes, and so on.
JVM 的类加载器子系统负责加载类文件。每当我们执行 Java 程序时,类加载器首先加载该程序。在 Java 中,有三个内置的类加载器。- 引导类加载器:最初的类加载器,是扩展类加载器的超类,即引导类加载器。它加载 rt.jar 文件,该文件包含所有 Java 标准版类文件,如 java.lang 包类、java.net 包类、java.util 包类、java.io 包类、java.sql 包类等。
- Extension ClassLoader: This is the parent classloader of the System classloader and the child classloader of Bootstrap. The jar files in the $JAVA HOME/jre/lib/ext directory are loaded.
- System/Application ClassLoader: Extension classloader's child classloader is System/Application ClassLoader. The class files are loaded from the classpath. The classpath is set to the current directory by default. The "-cp" or "-classpath" switches can be used to alter the classpath. Application class loader is another name for it.
643. What are the rules for a local and global variable?
局部变量和全局变量的规则是什么?
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c0f58d557c902bb6f40 | 官方: 否 | 付费: 否
答案:
Variables at the Global Level:
Global variables are variables declared outside of a function or in a global space.全局变量是在函数外部或全局空间中声明的变量。
If a variable is ever given a new value within the function, it is implicitly local, and we must explicitly declare it as 'global.' We must declare a variable using the global keyword to make it global.
如果变量在函数内被赋予了新值,则它隐式是局部的,我们必须明确声明其为“全局”。我们必须使用 global 关键字声明变量,使其成为全局变量。
Any function can access and modify the value of global variables from anywhere in the programme.
任何函数都可以从程序的任何位置访问和修改全局变量的值。Variables in the Local Environment:
A local variable is any variable declared within a function. This variable exists only in local space, not in global space.局部变量是在函数内部声明的任何变量。此变量仅存在于局部空间,而非全局空间。
It's presumed that a variable is local if it gets a new value anywhere in the function's body.
如果变量在函数体的任何位置被赋予新值,则假定它是局部的。
Only the local body has access to local variables.
只有局部主体才能访问局部变量。
Successful Tech Career for FREE!
免费开启成功的科技职业生涯!
Successful Tech Career!
成功的技术职业生涯!
Interview Process
面试流程
CTC & Designation
CTC与职位级别
Projects on the Job
工作项目
Referral System
推荐系统
Try It Out
试试看
2 Lakh+ Roadmaps Created
已生成20万+职业规划
644. Give an example of shuffle() method?
举一个shuffle()方法的例子?
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c0f58d557c902bb6f47 | 官方: 否 | 付费: 否
答案:
This method shuffles the string or array that is sent to it. It shuffles the array's contents. The random module contains this method. As a result, we must first import it before calling the function. When the function is called, it shuffles the elements and produces various results.
该方法会对发送给它的字符串或数组进行打乱操作。它会打乱数组中的内容。随机模块中包含该方法。因此,我们必须在调用该函数前先导入它。当函数被调用时,它会打乱元素并产生不同的结果。
645. What is the difference between events and callbacks in Node.js?
在Node.js中,事件和回调之间有什么区别?
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c0f58d557c902bb6f4d | 官方: 否 | 付费: 否
答案:
Although Events and Callbacks appear to be the same, the difference is that callback functions are invoked when an asynchronous function delivers a result, whereas event handling uses the observer pattern. When an event is fired, the listener function begins to run. The events module and the EventEmitter class, which are used to bind events and event listeners, provide a number of built-in events in Node.js.
虽然事件和回调看起来相同,但区别在于:回调函数是在异步函数传递结果时被调用的,而事件处理则使用观察者模式。当事件被触发时,监听器函数开始运行。Node.js中的事件模块和EventEmitter类(用于绑定事件和事件监听器)提供了许多内置事件。
646. Explain the features of Hadoop.
解释一下Hadoop的特性。
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c0f58d557c902bb6f56 | 官方: 否 | 付费: 否
答案:
The following are some of the key features of Hadoop :
以下是Hadoop的一些主要特性:
- It's a freeware framework based on open-source code.
- Hadoop is compatible with a wide range of hardware and makes it simple to add new hardware to a node.
- Hadoop enables data processing to be dispersed more quickly.
- The data is stored in a cluster that is separate from the rest of the operations.
- Hadoop allows you to make three clones of each block, each with a distinct node.
647. What is Node.js? Where can you use it?
什么是Node.js?你可以在哪里使用它?
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c0f58d557c902bb6f5c | 官方: 否 | 付费: 否
答案:
Node JS is a framework for easily creating fast and scalable network applications based on Chrome's JavaScript runtime. Because of its single-threaded nature, it's best suited for non-blocking, event-driven servers.
Node JS是一个框架,基于Chrome的JavaScript运行时,用于轻松创建快速且可扩展的网络应用程序。由于其单线程特性,它最适合非阻塞、事件驱动的服务器。
648. What is RDBMS?
什么是RDBMS?
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c0f58d557c902bb6f5f | 官方: 否 | 付费: 否
答案:
Database management systems that maintain data records and indexes in tables are known as relational database management systems (RDBMS). It is possible to construct and maintain relationships between and among the data and tables. Tables are used to express relationships between data elements in a relational database. Data values, not pointers, are used to define interdependencies between these tables. This gives you a lot of data independence. An RDBMS may recombine data items from several files, giving it powerful data-handling capabilities.
在表中维护数据记录和索引的数据库管理系统被称为关系数据库管理系统(RDBMS)。可以在数据和表之间构建并维护关系。在关系数据库中,使用表来表达数据元素之间的关系。这些表之间的相互依赖关系由数据值而非指针定义,这提供了很高的数据独立性。RDBMS可以重组多个文件中的数据项,从而具有强大的数据处理能力。
649. Describe the singleton pattern.
描述单例模式。
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c0f58d557c902bb6f62 | 官方: 否 | 付费: 否
答案:
The singleton pattern is a software design pattern in software engineering that limits the instantiation of a class to one "single" instance. This is beneficial when only one item is required to coordinate system-wide actions.
单例模式是软件工程中的一种软件设计模式,它将类的实例化限制为一个“单一”实例。当只需要一个对象来协调系统范围的操作时,这是有益的。
One of the most basic design patterns is the singleton. Sometimes we just need one instance of our class, such as a single DB connection shared by numerous objects, because making a separate DB connection for each object could be expensive. Similarly, instead of developing many managers, an application might have a single configuration manager or error manager that handles all problems.
单例是最基本的设计模式之一。有时我们只需要类的一个实例,比如由多个对象共享的单个数据库连接,因为为每个对象创建单独的数据库连接可能成本高昂。类似地,应用程序可能有一个单一的配置管理器或错误管理器来处理所有问题,而不是开发多个管理器。
650. What is an event loop?
什么是事件循环?
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c0f58d557c902bb6f67 | 官方: 否 | 付费: 否
答案:
The event loop is the key to asynchronous programming in JavaScript. Although JS executes all operations on a single thread, it offers the appearance of multi-threading through the use of a few clever data structures. The call stack is in charge of keeping track of all the actions in the queue that need to be completed. When a function completes, it is removed from the stack. The event queue is in charge of transmitting new functions to the track so that they can be processed. It maintains the correct sequence in which all operations should be sent for execution by using the queue data structure.
事件循环是JavaScript异步编程的关键。尽管JS在单线程上执行所有操作,但它通过使用一些巧妙的数据结构提供了多线程的外观。调用栈负责跟踪队列中所有需要完成的操作。当函数完成时,它会从栈中移除。事件队列负责将新函数传输到轨道以便处理。它使用队列数据结构来维护所有操作应被发送以执行的正确顺序。
651. What is a callback function?
什么是回调函数?
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: PayPal
- id: 69b37c0f58d557c902bb6f6c | 官方: 否 | 付费: 否
答案:
A callback function is a function that is supplied as an input to another function and then invoked inside the outer function to finish a routine or operation. Here is an example:
回调函数是作为输入提供给另一个函数,然后在外层函数内部被调用以完成例程或操作的函数。以下是一个示例:
function greeting(name) {
function greeting(name) {
alert('Hello ' + name);
alert('Hello ' + name);
}
function processUserInput(callback) {
function processUserInput(callback) {
var name = prompt('Enter the name here.');
var name = prompt('Enter the name here.');
callback(name);
callback(name);
}
processUserInput(greeting);
processUserInput(greeting);
652. What is the Eligibility Criteria for Paypal?
PayPal的资格标准是什么?
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c1058d557c902bb6fa3 | 官方: 否 | 付费: 否
答案:
Eligibility Criteria and Required Skills for PayPal Recruitment: - Branches of BTech (CSE, IT, CSE with Bioinformatics) are eligible to participate in the PayPal hiring procedure.
PayPal招聘的资格标准和所需技能:- BTech(计算机科学、信息技术、计算机科学与生物信息学)分支有资格参加PayPal的招聘流程。
- The candidate must have a minimum CGPA of 7 in order to continue with his or her studies.
- The candidate must have received a minimum of 70% in grades X and XII.
653. Do PayPal interns get paid?
PayPal实习生有薪水吗?
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c1058d557c902bb6fa6 | 官方: 否 | 付费: 否
答案:
Yes, Paypal interns do get paid. Undergraduate and graduate students can work on real, relevant initiatives that help PayPal's business and customers through internships.
是的,PayPal实习生有薪水。本科生和研究生可以通过实习参与实际、相关的项目,这些项目有助于PayPal的业务和客户。
654. Does PayPal pay a good salary?
PayPal的薪资好吗?
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c1058d557c902bb6fa9 | 官方: 否 | 付费: 否
答案:
The typical PayPal pay ranges from around 4.7 lakhs for an Operational Risk Officer to 76.8 lakhs for a Director. Salary estimates are based on 2.4k PayPal salaries from a variety of PayPal employees.
PayPal的典型薪资范围从运营风险官约47万卢比到总监768万卢比不等。薪资估算基于来自众多PayPal员工的2400份薪资数据。
655. How can I introduce myself in a technical interview?
在技术面试中如何自我介绍?
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c1058d557c902bb6fac | 官方: 否 | 付费: 否
答案:
You can talk about your journey into technology when asked to introduce yourself. What drew you to coding in the first place, and why was web development (or other job-specific skills) a good fit for you? What does that have to do with our job or our company's objectives?
当被要求自我介绍时,你可以谈谈自己进入技术领域的历程。最初是什么吸引你接触编程,为什么网页开发(或其他与职位相关的技能)适合你?这与我们的职位或公司目标有什么关系?
656. Why do you want to work at PayPal?
你为什么想在PayPal工作?
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c1058d557c902bb6faf | 官方: 否 | 付费: 否
答案:
PayPal is a value-driven organisation driven by its core values of collaboration, innovation, wellness and inclusion. I would want to be in a collaborative work culture wherein I’ll be able to contribute to the team as well as develop my career.
PayPal是一个以价值观驱动的组织,其核心价值包括协作、创新、健康与包容。我希望在一个协作的工作文化中工作,在那里我既能贡献团队,也能发展自己的职业生涯。
657. How do I pass a PayPal interview?
如何通过PayPal面试?
- 知识点: 其他/未分类 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c1058d557c902bb6fb2 | 官方: 否 | 付费: 否
答案:
PayPal takes a candidate-friendly attitude even during on-campus rounds, but it looks beyond your technical talents and expertise. Two independent technical rounds precede a face-to-face interview with the hiring manager, which sets PayPal apart from other software businesses.
PayPal在校园招聘轮次中也采取对候选人友好的态度,但它更看重超越你技术才能和专业知识的能力。两轮独立的技术面试之后是与招聘经理的面对面面试,这使得PayPal区别于其他软件公司。
Three significant aspects influence the interview process: - What is important to you?
面试过程受三个重要方面影响:- 对你来说什么最重要?
- How do you work?
What do you require to advance and succeed?
Coding Problems
0/5
Easy Problems
简单问题
Arrays
数组
Time Complexity
时间复杂度
Math
数学
Binary Search
二分查找
Probability
概率
Max Sum Contiguous Subarray
最大连续子数组和
Easy
简单
33.39 Mins
33.39分钟
Solve
解答
Minimum Absolute Difference
最小绝对差
Easy
简单
22.11 Mins
22.11 分钟
Solve
解答
Find if two rectangles overlap
判断两个矩形是否重叠
Very Easy
非常简单
26.14 Mins
26.14 分钟
Solve
解答
Missing Element
缺失元素
Easy
简单
42.40 Mins
42.40 分钟
Solve
解答
Boy or girl paradox
男孩或女孩悖论
Easy
简单
5.55 Mins
5.55 分钟
Solve
解答
0/3
Intermediate Problems
中级问题
Strings
字符串
Graph Data Structure & Algorithms
图数据结构与算法
Zigzag String
之字形字符串
Medium
中等
52.40 Mins
52.40 分钟
Solve
解答
Good Graph
好图
Medium
中等
62.25 Mins
62.25分钟
Solve
解答
Convert the amount in number to words
将数字金额转换为文字
Medium
中等
38.12 Mins
38.12 分钟
Solve
解答
658. State difference between Commit and Rollback in SQL.
说明SQL中COMMIT和ROLLBACK之间的区别。
- 知识点: 其他/未分类 (标签: interviewbit, paypay, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPay
- id: 69b37c1158d557c902bb7028 | 官方: 否 | 付费: 否
答案:
Commit and Rollback differ in the following ways:
提交(Commit)和回滚(Rollback)在以下方面有所不同:
| Commit 提交 | Rollback 回滚 |
|---|---|
| A COMMIT statement in SQL is used to permanently save the changes made during a transaction in a table/database. SQL中的COMMIT语句用于永久保存事务期间对表/数据库所做的更改。 | ROLLBACK statements in SQL are used to undo unfinished transactions in the database. SQL中的ROLLBACK语句用于撤销数据库中未完成的事务。 |
| It is impossible for the database to return to its previous state after COMMIT has been executed. 执行COMMIT后,数据库不可能恢复到之前的状态。 | In case of an error during transaction execution, this command will restore the database to its previous state. 如果在事务执行期间出现错误,此命令将把数据库恢复到其之前的状态。 |
| COMMIT is applied after a successful transaction. COMMIT在事务成功后应用。 | ROLLBACK occurs when a transaction is aborted, incorrectly executed, or a system failure occurs 当事务被中止、错误执行或发生系统故障时,会发生ROLLBACK。 |
| When all statements are correctly executed without error, the COMMIT statement permanently saves the state. 当所有语句正确执行且无错误时,COMMIT语句会永久保存状态。 | With the ROLLBACK statement, if any operations fail during the execution of a transaction, the change is not permanently saved; therefore, it may be undone with the statement. 使用ROLLBACK语句时,如果事务执行期间任何操作失败,更改不会永久保存;因此,可以使用该语句撤销更改。 |
| Syntax: COMMIT; 语法:COMMIT; | Syntax: ROLLBACK; 语法:ROLLBACK; |
659. What is race condition?
什么是竞态条件?
- 知识点: 其他/未分类 (标签: interviewbit, paypay, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPay
- id: 69b37c1158d557c902bb7038 | 官方: 否 | 付费: 否
答案:
Both Race Condition and Data Race terms are frequently used when developing multi-threaded programs and are responsible for several types of exceptions, including the well-known EXC_BAD_ACCESS. Race conditions occur when the timing or ordering of events (multiple threads) affects the correctness of a program.
竞态条件(Race Condition)和数据竞争(Data Race)这两个术语在开发多线程程序时经常被使用,并且是多种异常(包括著名的EXC_BAD_ACCESS)的原因。竞态条件发生在事件(多个线程)的时机或顺序影响程序正确性时。
The race condition results from two or more threads accessing shared data at the same time and attempting to change it simultaneously. The thread scheduling algorithm is capable of switching between threads at any time, so you never know in what order they will try to access the shared data. Thus, the outcome of data changes is determined by the thread scheduling algorithm. Thus, both threads fight/race for control of the data that they wish to access/change.
竞态条件是由两个或多个线程同时访问共享数据并试图同时更改它而产生的。线程调度算法能够在任何时间在线程之间切换,因此你永远不知道它们将以何种顺序尝试访问共享数据。因此,数据更改的结果由线程调度算法决定。因此,两个线程为了控制它们希望访问/更改的数据而相互争斗/竞争。
660. Explain data race.
解释数据竞争。
- 知识点: 其他/未分类 (标签: interviewbit, paypay, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPay
- id: 69b37c1158d557c902bb703b | 官方: 否 | 付费: 否
答案:
Programs utilizing multiple threads can be highly complex and can introduce subtle defects, such as race conditions and deadlocks. If such a defect is present, it may take a considerable amount of time to reproduce the problem and even longer to identify and remedy it. A data race occurs when multiple tasks or threads are accessing a shared resource simultaneously without adequate protection, resulting in unpredictable behavior. A data race defect is caused when: - A shared variable is accessed simultaneously by two or more threads in a single process,
使用多线程的程序可能非常复杂,并可能引入微妙的缺陷,如竞态条件和死锁。如果存在此类缺陷,可能需要相当长的时间来重现问题,甚至更长时间来识别和修复它。当多个任务或线程在没有适当保护的情况下同时访问共享资源时,就会发生数据竞争,导致不可预测的行为。数据竞争缺陷是由以下原因引起的:- 在单个进程中,两个或多个线程同时访问一个共享变量,
- One of the threads attempts to modify the variable, and
- Threads do not use exclusive locks in order to control access to that memory.
661. What is the Eligibility Criteria at PayPay?
PayPay的资格标准是什么?
- 知识点: 其他/未分类 (标签: interviewbit, paypay, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPay
- id: 69b37c1258d557c902bb7078 | 官方: 否 | 付费: 否
答案:
PayPay Eligibility Criteria for freshers - Degree Required: BE/BTech/BCA/MCA.
PayPay 针对应届毕业生的资格标准 - 学历要求:BE/BTech/BCA/MCA。
- Programming skills in at least one language.
- Good analytical skills and problem-solving abilities.
- Strong foundation in Computer Science.
- Knowledge of the project undertaken as part of the course curriculum.
662. How long is the PayPay Interview process?
PayPay 的面试流程需要多长时间?
- 知识点: 其他/未分类 (标签: interviewbit, paypay, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPay
- id: 69b37c1258d557c902bb707b | 官方: 否 | 付费: 否
答案:
Interviewing is a fairly straightforward process, and there are generally four rounds involved. Depending on the complexity of the interview, it might take PayPay three to four weeks to finalize the process.
面试是一个相当直接的过程,通常涉及四轮。根据面试的复杂程度,PayPay 可能需要三到四周的时间来完成整个流程。
663. Does PayPay pay well?
PayPay 的薪资待遇好吗?
- 知识点: 其他/未分类 (标签: interviewbit, paypay, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPay
- id: 69b37c1258d557c902bb707e | 官方: 否 | 付费: 否
答案:
The salary of a Software Engineer at PayPay varies with the type of role and experience. You can expect to earn between JP¥65,00,000/yr and JP¥1Cr/yr . A Software Engineer can earn up to J P¥76,28,389/yr annually on average.
PayPay 软件工程师的薪资因职位类型和经验而异。您预计可以获得每年 JP¥65,00,000 至 JP¥1Cr 之间的薪资。软件工程师平均每年最高可获得 JP¥76,28,389。
664. How do I join PayPay?
我如何加入 PayPay?
- 知识点: 其他/未分类 (标签: interviewbit, paypay, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPay
- id: 69b37c1258d557c902bb7081 | 官方: 否 | 付费: 否
答案:
PayPay interviews candidates both on-campus and online. Online applicants should first submit their resumes and cover letters to suitable job postings. In shortlisting applicants, PayPay takes into account their previous or current roles, their professional goals, and their motivations for seeking employment with PayPay. Finally, the interview process consists of four rounds, and if you are selected, you will be contacted by a recruiter within two to three business days and receive an offer letter within a week. On-campus hiring follows a similar process.
PayPay 通过校园招聘和在线方式面试候选人。在线申请者应首先将简历和求职信提交到合适的职位发布中。在筛选申请者时,PayPay 会考虑他们之前或当前的职位、职业目标以及申请 PayPay 职位的动机。最后,面试过程包括四轮,如果您被选中,招聘人员将在两到三个工作日内与您联系,并在一周内收到录用通知书。校园招聘遵循类似流程。
665. Is PayPay interview difficult?
PayPay 面试难吗?
- 知识点: 其他/未分类 (标签: interviewbit, paypay, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPay
- id: 69b37c1258d557c902bb7084 | 官方: 否 | 付费: 否
答案:
New members are joining PayPay from around the world in order to revolutionize the industry and create new values. There is a little bit of a learning curve to the PayPay interview and its level of difficulty is still quite basic. Although some questions are difficult, most are fairly straightforward. Anyhow, if you are well prepared, no interview will seem difficult. Preparation for a job interview can make you appear relaxed, calm, and collected, which is exactly what an employer wants in a potential employee.
来自世界各地的新成员正在加入 PayPay,以革新行业并创造新的价值。PayPay 的面试有一点学习曲线,但难度级别仍比较基础。虽然有些问题很难,但大多数都相当直接。无论如何,如果您准备充分,没有面试会显得困难。面试准备可以让您显得放松、冷静和镇定,这正是雇主在潜在员工中想要的。
666. Give a few features of Hadoop.
给出 Hadoop 的几个特性。
- 知识点: 其他/未分类 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Paytm
- id: 69b37c1358d557c902bb70fe | 官方: 否 | 付费: 否
答案:
A few features of Hadoop are as follows:
Hadoop 的几个特性如下:
- OpenSource: Hadoop is free to use because it is open-source. Because it is an open-source project, the source code is available online for anybody to read and modify according to their industry's needs.
- Fault Tolerance: Hadoop runs on commodity hardware (cheap computers) that can crash at any time. Data in Hadoop is duplicated across multiple DataNodes in a Hadoop cluster, ensuring data availability even if one of your systems fails. If a single machine has a technical problem, you can read all of the data from that machine. Because the data is copied or replicated by default, it can also be read from other nodes in a Hadoop cluster. Hadoop produces three copies of each file block by default and stores them in various nodes. This replication factor is customizable and can be modified in the hdfs-site.xml file by modifying the replication attribute.
- Clusters with High Scalability: Hadoop is a model that is extremely scalable. A significant volume of data is split across several low-cost devices in a cluster and processed in parallel. According to the needs of the business, the number of these computers or nodes can be increased or decreased. Traditional RDBMS (Relational DataBase Management System) systems are incapable of scaling to massive amounts of data.
- Cheap and cost-effective: Unlike traditional Relational databases, which require expensive hardware and high-end CPUs to deal with Big Data, Hadoop is open-source and leverages cost-effective commodity technology, resulting in a cost-effective paradigm. The difficulty with traditional Relational databases is that holding a large number of data is not cost-effective, thus businesses have begun to eliminate raw data, which may not result in the best business scenario. Hadoop offers two key cost advantages: it is open-source, which means it is free to use, and it employs commodity hardware, which is very inexpensive.
- High Availability: In a Hadoop cluster, fault tolerance ensures high availability. The availability of data on the Hadoop cluster is referred to as high availability. Because of fault tolerance, if one of the DataNodes fails, the data can be recovered from any other node where the data is replicated. The Hadoop cluster with the highest availability also has two or more Name Nodes, i.e. Active NameNode and Passive NameNode, also known as standby NameNode, are two types of name nodes. If the Active NameNode fails, the Passive NameNode will take over and give the same data as the Active NameNode, which the user may easily use.
- Flexibility: Hadoop is built in such a way that it can efficiently handle any type of dataset, including structured (MySql Data), semi-structured (XML, JSON), and unstructured (Images and Videos). This implies it can analyse any type of data regardless of its form, making it extremely adaptable. It is extremely beneficial to organisations because it allows them to process enormous datasets quickly. As a result, businesses can utilise Hadoop to analyse important insights from data sources such as social media, email, and other sources. Hadoop's flexibility allows it to be used for log processing, data warehousing, fraud detection, and other tasks.
667. How can one differentiate between local variables and global variables?
如何区分局部变量和全局变量?
- 知识点: 其他/未分类 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Paytm
- id: 69b37c1358d557c902bb7101 | 官方: 否 | 付费: 否
答案:
Global variables and Local variables can be distinguished based on their features.
全局变量和局部变量可以根据其特性进行区分。
Global variables possess the following features: - Variables defined outside of a function or in a global space are known as global variables.
全局变量具有以下特性: - 在函数外部或全局空间中定义的变量称为全局变量。
- If a variable in the function is ever given a new value, it is implicitly local, and we must explicitly designate it as 'global.' To make a variable global, we must declare it with the global keyword.
From anywhere in the programme, any function can access and modify the value of global variables.
Local Variables possess the following features: - Any variable declared within a function is referred to as a local variable. This variable only exists in local space; it does not exist in global space.局部变量具有以下特性: - 在函数内声明的任何变量称为局部变量。该变量仅存在于局部空间中,不存在于全局空间中。
- If a variable receives a new value anywhere in the function, it is assumed to be local.
- The local body is the only part where these variables can be accessed.
668. What is the definition of marshalling?
什么是编组(marshalling)的定义?
- 知识点: 其他/未分类 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Paytm
- id: 69b37c1358d557c902bb7110 | 官方: 否 | 付费: 否
答案:
Marshalling is the conversion of a memory representation of an object into a format that can be saved or transferred to other software applications. Marshalling is the process of converting an object into a serialised form that allows faraway objects to communicate with one other. The phrases serialisation and marshalling are frequently used interchangeably. The goal of marshalling is to have the same object that is present in one operating programme be present in another, i.e. a client object to be transferred to and present on the server. Serialization, for example, does not necessarily have this goal in mind because it is only concerned with converting data into a stream of bytes.
编组是将对象的内存表示转换为可以保存或传输到其他软件应用程序的格式。编组是将对象转换为序列化形式的过程,使远程对象能够相互通信。序列化和编组这两个术语经常互换使用。编组的目标是使一个操作程序中存在的同一对象也能存在于另一个程序中,即客户端对象被传输到服务器并在服务器上存在。例如,序列化不一定有此目标,因为它只关注将数据转换为字节流。
669. In C, define Storage Classes. List the several storage classes available in C.
在 C 语言中,定义存储类。列出 C 语言中可用的几种存储类。
- 知识点: 其他/未分类 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Paytm
- id: 69b37c1358d557c902bb7113 | 官方: 否 | 付费: 否
答案:
Storage Classes are used to define a variable's or function's properties. The scope, visibility, and durability of a variable are all characteristics that allow us to track its presence during the execution of a program. In the C programming language, there are four storage classes: - Auto: All variables supplied inside a function or a block are stored in this class by default. Auto variables can only be used within the block/function in which they were defined; they cannot be used outside of that block/function (which defines their scope). They can be accessed outside of their scope, though, by using pointers that point to the memory address where the variables are stored. Whenever they are declared, they are given a garbage value by default.
存储类用于定义变量或函数的属性。变量的作用域、可见性和持久性都是允许我们在程序执行期间跟踪其存在的特性。在 C 编程语言中,有四种存储类: - Auto:函数或块内提供的所有变量默认存储在此类中。自动变量只能在其定义的块/函数内使用,不能在该块/函数之外使用(这定义了它们的作用域)。不过,可以通过指向变量存储内存地址的指针在作用域之外访问它们。每当声明它们时,默认会赋予一个垃圾值。
- Extern: The storage class is external. The term "extern" simply denotes that the variable is defined outside of the block in which it is used. In essence, it is given a value in another block, which can subsequently be overwritten or updated in another block. An ordinary global variable can be made extern by using the 'extern' keyword before its declaration or definition in any function or block. This means that rather than creating a new variable, we're just accessing and using the global variable. The extern keyword can be used to make variables and functions more visible. The usage of extern in function declarations or definitions is unnecessary because functions are visible throughout the programme by default. Its application is self-evident. When declaring a variable with extern, we are not really going to define it.
- Register: This storage class declares register variables, which are similar to auto variables in terms of functionality. The main difference is that the compiler will attempt to store these variables in the CPU's register if a free registration is available. If there are no free registers, the data is stored solely in memory. The register keyword is used to define a few variables that will be accessed frequently throughout a programme, allowing it to run faster. The address of a register variable cannot be accessed via pointers, which is a crucial detail to remember.
- Static: This storage type is used to define static variables, which are commonly utilised in C language programs. Static variables can preserve their value even after they've been removed from their scope! As a result, we can say that they are only initialised once and only exist till the program ends. Because they are not declared again, no new RAM is allocated. They have a limited scope, which is confined to the role that has been assigned to them. The program's global static variables can be accessed from anywhere in the code. The compiler sets a value of 0 to these by default.
670. Explain the various layers in the OSI model in context to computer networking.
在计算机网络背景下,解释 OSI 模型中的各个层。
- 知识点: 其他/未分类 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Paytm
- id: 69b37c1358d557c902bb711f | 官方: 否 | 付费: 否
答案:
OSI is an acronym for Open Systems Interconnection. The International Organization for Standardization (ISO) founded it in 1984 and It is a seven-layer architecture with separate functions for each tier. These seven layers work together to transport data across the globe from one person to another. - Physical Layer: In the OSI reference model, the physical layer is the lowest layer. It is responsible for establishing a physical link between the devices. The physical layer stores bits of information. Its job is to send individual bits from one node to the next. This layer receives data and turns it into 0s and 1s before sending it to the Data Link layer, which reassembles the frame.
OSI是开放系统互连(Open Systems Interconnection)的缩写。国际标准化组织(ISO)于1984年创立了它,这是一个七层架构,每一层都有各自独立的功能。这七层协同工作,将数据传输到全球各地,实现人与人之间的通信。- 物理层:在OSI参考模型中,物理层是最低层。它负责在设备之间建立物理链路。物理层存储信息位。其任务是将单个位从一节点发送到下一节点。该层接收数据并将其转换为0和1,然后发送给数据链路层,后者重新组装帧。
Data Link Layer: The data link layer is in charge of message transport from one node to the next. This layer's primary function is to ensure that data transfers between nodes via the physical layer are error-free. The Data Link Layer is divided into two sublayers:
Control of Media Access (MAC) Control of Logical Links (LLC) - Network Layer: The network layer is in charge of data transfer between hosts that are linked to different networks. It also manages packet routing, which is the process of selecting the shortest path among a vast number of alternatives to send a packet. The sender and receiver's IP addresses are included in the header by the network layer.媒体访问控制(MAC)逻辑链路控制(LLC)- 网络层:网络层负责连接不同网络的主机之间的数据传输。它还管理数据包路由,这是从众多可选路径中选择最短路径来发送数据包的过程。网络层在报头中包含发送方和接收方的IP地址。
- Transport Layer: The transport layer provides services to the application layer, whereas the network layer provides services to the transport layer. In the transport layer, segments are the data units. It is in charge of delivering the entire message from start to finish. The transport layer recognises successful data transmission and re-transmits the data if a mistake is found.
- Session Layer: The Session Layer is responsible for creating connections, maintaining sessions, authenticating users, and guaranteeing security.
- Presentation Layer: The data from the application layer is obtained and processed in this layer so that it may be delivered across the network in the correct format.
- Application Layer: The Application layer is at the very top of the OSI Reference Model stack of layers, and it is implemented by network applications. These applications generate the information that must be transmitted via the network. This layer also serves as a window through which application services can connect to the network and display information to the user.
671. What do you understand about the Bug Life Cycle.
你对Bug生命周期有何理解?
- 知识点: 其他/未分类 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Paytm
- id: 69b37c1358d557c902bb7125 | 官方: 否 | 付费: 否
答案:
The bug life cycle, also called the defect life cycle, is the process through which a defect advances through multiple phases over the course of its existence. This lifetime begins when a tester reports an issue and ends when the problem has been fixed and will not recur. The following fault states can occur in a defect workflow. - New: A new defect is referred to as "new" and given the status of New when it is first documented.
Bug生命周期,也称为缺陷生命周期,是缺陷在其存在期间经历多个阶段的流程。这个生命周期始于测试人员报告问题时,止于问题被修复且不会再次出现。缺陷工作流中可能出现以下缺陷状态。- 新建:新缺陷在首次记录时被称为“新建”,并赋予新建状态。
- Assigned: When a tester files a bug report, the tester's lead approves it and assigns it to the programming team.
- Open: The developer starts analysing and fixing the problem.
- Fixed: Once a developer has done a necessary code patch and confirmed it, he or she can mark an issue as "Fixed."
- Pending Retest: Once the issue has been resolved, the developer provides the tester with a unique code to retest the code. Because the software testing is still pending from the testers, the status is "pending retest."
- Retest: At this stage, the tester retests the code to verify if the developer has repaired the problem, and the status is changed to "Re-test."
- Reopened: If the bug persists after the developer has fixed it, the tester changes the status to "reopened." The bug goes through the entire life cycle again.
- Verified: After the developer has fixed the bug, the tester re-tests it. The bug is repaired and the status is updated to "confirmed" if no bugs are detected in the software.
- Closed: The tester tags a bug as "Closed" when it is no longer existent.
672. What do you understand about web applications?
你对Web应用程序有何理解?
- 知识点: 其他/未分类 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Paytm
- id: 69b37c1358d557c902bb712c | 官方: 否 | 付费: 否
答案:
A web application (or web app) is application software that runs on a web server, as opposed to computer-based software applications that run locally on the device's operating system (OS). To access web applications, the user must utilise a web browser with an active network connection. The user ("client") accesses services from an off-site server hosted by a third party in these applications, which are designed on a client and server architecture. Regularly used web applications include webmail, online retail shopping, and online banking.
Web应用程序(或Web应用)是运行在Web服务器上的应用软件,与本地运行在设备操作系统(OS)上的基于计算机的软件应用相对。要访问Web应用程序,用户必须使用具有活动网络连接的Web浏览器。在这些基于客户端和服务器架构设计的应用中,用户(“客户端”)从由第三方托管的异地服务器上访问服务。常用的Web应用程序包括Web邮件、在线零售购物和在线银行。
673. What does DHCP stand for? State some of the benefits and drawbacks of DHCP.
DHCP代表什么?请列举DHCP的一些优点和缺点。
- 知识点: 其他/未分类 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Paytm
- id: 69b37c1358d557c902bb7132 | 官方: 否 | 付费: 否
答案:
DHCP is an acronym for Dynamic Host Configuration Protocol. It has a client and server architecture.
DHCP是动态主机配置协议(Dynamic Host Configuration Protocol)的缩写。它采用客户端和服务器架构。
Given below are some of DHCP's perks or benefits : - DHCP is simple to set up and automatically assigns IP addresses to request clients. As a result, the amount of time required to manually configure IP addresses will be brought down.
以下是DHCP的一些优势或好处:- DHCP设置简单,并自动向请求的客户端分配IP地址。因此,手动配置IP地址所需的时间将大大减少。
- The deployment will not result in any additional expenses.
- It is prevented that IP addresses can be assigned twice or incorrectly. As a result, no IP address disputes exist.
- It simplifies network administration.
- It can handle a wide range of scopes, including multicast and super scopes.
It has a big advantage for mobile users because the newer network sends the relevant configuration parameters right away.
Given below are some of the disadvantages or drawbacks of DHCP : - Due to the fact that DHCP packets cannot traverse routers, a relay agent is required to ensure that the DHCP server manages each and every communication for both the network segments. Relay agents accept broadcasted DHCP packets and these packets are forwarded by these agents as unicast packets towards the DHCP server. The relay agent should be configured with the DHCP server's IP address in this situation.以下是DHCP的一些劣势或缺点:- 由于DHCP数据包无法穿越路由器,需要中继代理来确保DHCP服务器管理两个网络段的所有通信。中继代理接受广播的DHCP数据包,并将这些数据包作为单播数据包转发到DHCP服务器。在这种情况下,中继代理应配置DHCP服务器的IP地址。
- The DHCP server may be a single point of failure in networks with only one configured DHCP server.
- Due to the lack of a secure method for client authentication, the DHCP server can get unauthorised access to its IP addresses via the submission of credential details like DHCP client identifiers.
The machine name remains the same on a new IP address being assigned.
PayTM Interview Preparation
674. How can I get a Paytm internship?
如何获得Paytm实习机会?
- 知识点: 其他/未分类 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Paytm
- id: 69b37c1458d557c902bb7166 | 官方: 否 | 付费: 否
答案:
In order to get an internship for software development at Paytm, one can apply on their careers portal , as soon as one sees an opening. Also, reaching out to recruiters over social media platforms like Linkedin could be another alternative to getting an internship opportunity at Paytm. If a recruiter at Paytm likes one resume, he or she can be asked to go through the Paytm Recruitment process as mentioned in the article previously and one can land an internship offer that way. Note, that the number of interview rounds may be lesser than the ones for regular jobs as seems fit to the recruiter.
要获得Paytm的软件开发实习机会,可以在其职业门户上看到招聘信息时立即申请。此外,通过LinkedIn等社交媒体平台联系招聘人员是另一种获得Paytm实习机会的途径。如果Paytm的招聘人员喜欢某人的简历,可以要求其按照本文前面提到的Paytm招聘流程进行,从而获得实习录用通知。请注意,面试轮次可能会少于常规职位的轮次,具体视招聘人员的决定而定。
675. What are the most important topics to cover in order to prepare for an Paytm interview?
为了准备Paytm面试,需要涵盖哪些最重要的主题?
- 知识点: 其他/未分类 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Paytm
- id: 69b37c1458d557c902bb716b | 官方: 否 | 付费: 否
答案:
During the Paytm interview, your programming skills will be tested. Computer networking, database management systems, software management, operating systems, and cloud computing will all be questioned. Check to see if you are prepared for the projects you have developed. It may also be good to learn the principles of HTML, C, C++, and other computer-related fields. Prepare the items mentioned in your CV. The most frequently asked questions in Paytm HRinterviews are about relocation, resumes, reasons for leaving the prior business (for experienced people switching companies), and expected pay. Check the above section to learn more .
在Paytm面试中,你的编程技能将受到测试。计算机网络、数据库管理系统、软件管理、操作系统和云计算都会被提问。请检查你是否对已开发的项目有所准备。学习HTML、C、C++和其他计算机相关领域的原则可能也有好处。准备好简历中提到的内容。Paytm人力资源面试中最常问的问题涉及搬迁、简历、离职原因(针对跳槽的有经验人士)以及期望薪资。查看以上部分了解更多信息。
676. How long is the Paytm Software Engineering Interview?
Paytm软件工程面试持续多长时间?
- 知识点: 其他/未分类 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Paytm
- id: 69b37c1458d557c902bb7171 | 官方: 否 | 付费: 否
答案:
A Paytm Software Engineering interview typically lasts between forty-five minutes to sixty minutes. The full Paytm Recruitment process is made up of several phases (both coding and interviews) and takes about two to three months to complete.
Paytm软件工程面试通常持续四十五分钟至六十分钟。完整的Paytm招聘流程由多个阶段(包括编码和面试)组成,大约需要两到三个月才能完成。
677. What is the average salary of a Paytm Fresher Software Engineer?
Paytm 应届软件工程师的平均薪资是多少?
- 知识点: 其他/未分类 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Paytm
- id: 69b37c1458d557c902bb717b | 官方: 否 | 付费: 否
答案:
The average Paytm Software Engineer pay in India for freshers is around 6-12lakh Indian rupees.
在印度,Paytm 应届软件工程师的平均薪资约为 6 至 12 万卢比。
678. How to crack the Paytm interview?
如何通过 Paytm 面试?
- 知识点: 其他/未分类 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Paytm
- id: 69b37c1458d557c902bb717e | 官方: 否 | 付费: 否
答案:
One should be thorough with the Paytm Interview questions covered in this article and be in touch with Computer Science fundamentals. During the interview, remaining calm and answering the questions to the point has a positive impression on the interviewers. Lastly, it is very important to communicate well with the interviewers so that they feel that the candidate can work well in a team environment.
应聘者应熟练掌握本文涵盖的 Paytm 面试问题,并熟悉计算机科学基础知识。面试过程中,保持冷静、回答问题时直击要点会给面试官留下积极印象。最后,与面试官良好沟通非常重要,这样他们才会觉得候选人能够在团队环境中很好地工作。
679. Is the Paytm interview hard?
Paytm 面试难吗?
- 知识点: 其他/未分类 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Paytm
- id: 69b37c1458d557c902bb7181 | 官方: 否 | 付费: 否
答案:
Usually, the Paytm software engineering interviews are of easy to medium difficulty. Having said that, one should prepare extremely well for the interview and be thorough with the concepts of Computer Science in order to perform well. More often than not, it is not a question that whether the interview is tough or easy but depends on one's level of preparation for the interview. Going through the previous interview experiences, practising data structures and algorithm coding problems, revising subjects like Operating systems, Computer Networks, Database Management Systems, Object-Oriented Programming, etc. can help one crack these Paytm interviews with ease.
通常,Paytm 软件工程师面试难度为简单至中等。话虽如此,应聘者仍需为面试做好充分准备,并全面掌握计算机科学概念,才能表现出色。很多时候,问题不在于面试是难还是易,而在于个人对面试的准备程度。查阅以往的面试经验、练习数据结构和算法编码问题、复习操作系统、计算机网络、数据库管理系统、面向对象编程等科目,都有助于轻松通过 Paytm 面试。
680. Why do you want to join Paytm?
你为什么想加入 Paytm?
- 知识点: 其他/未分类 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Paytm
- id: 69b37c1458d557c902bb7184 | 官方: 否 | 付费: 否
答案:
Paytm is one of the biggest Technology companies in not only India but the world right now. With an immense focus on cutting edge technologies like payment gateways, trading channels (via Paytm money, etc.), technology teams at Paytm are playing a major role in running their business. Hence, the exposure and leverage given to Paytm software engineers are huge both in terms of money as well as exposure to various tools of the trade. Hence, any engineering aspirant or technology enthusiast should consider joining Paytm as it is creating technologies of today as well as for the future.
Paytm 不仅是印度,也是全球目前最大的科技公司之一。凭借对支付网关、交易渠道(如 Paytm Money 等)等尖端技术的高度重视,Paytm 的技术团队在运营其业务中发挥着重要作用。因此,Paytm 软件工程师获得的曝光度和优势在薪资以及接触各类行业工具方面都是巨大的。因此,任何工程领域的求职者或技术爱好者都应该考虑加入 Paytm,因为它不仅正在创造今天的技术,也在创造未来的技术。
Coding Problems
0/2
Easy Problems
简单问题
Arrays
数组
Two Pointers
双指针
Set Matrix Zeros
矩阵置零
Easy
简单
48.4 Mins
48.4 分钟
Solve
解答
Swaps to make Palindromic String
交换以形成回文字符串
Easy
简单
0 Mins
0 分钟
Solve
解答
0/2
Intermediate Problems
中级问题
Arrays
数组
Graph Data Structure & Algorithms
图数据结构与算法
Array Sum
数组求和
Medium
中等
38.12 Mins
38.12 分钟
Solve
解答
Mother Vertex
母顶点
Medium
中等
51.19 Mins
51.19 分钟
Solve
解答
681. Write a program to remove alternate occurring vowels in the given code
编写一个程序,从给定代码中删除交替出现的元音
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1858d557c902bb7417 | 官方: 否 | 付费: 否
答案:
Given string str, we must remove consecutive vowels (a, e, i, o, u) present in the string. For example, if a string is InterviewBit, then after removing alternate occurring vowels, the output will be IntervewBt.
给定字符串str,我们必须删除字符串中连续出现的元音(a, e, i, o, u)。例如,如果字符串是InterviewBit,那么删除交替出现的元音后,输出将是IntervewBt。
Code:
代码:
// Java program for counting vowels in a string
// 用于统计字符串中元音的Java程序
import java.io.*;
import java.io.*;
import java.util.*;
import java.util.*;
import java.lang.*;
import java.lang.*;
public class Main
public class Main
{
// Check for vowels
// 检查元音
static boolean isVowel(char ch)
static boolean isVowel(char ch)
{
ch = Character.toUpperCase(ch);
ch = Character.toUpperCase(ch);
return (ch=='A' || ch=='E' || ch=='I' ||
return (ch=='A' || ch=='E' || ch=='I' ||
ch=='O' || ch=='U');
ch=='O' || ch=='U');
}
// Counts the number of vowels in str
// 计算str中元音的数量
static int count(String str)
static int count(String str)
{
int total= 0;
int total= 0;
for (int i = 0; i < str.length(); i++)
for (int i = 0; i < str.length(); i++)
if (isVowel(str.charAt(i)))
if (isVowel(str.charAt(i)))
++total;
++total;
return total;
return total;
}
// Driver code
// 驱动代码
public static void main(String args[])
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
Scanner sc = new Scanner(System.in);
System.out.print("Enter a string: ");
System.out.print("输入一个字符串: ");
String str= sc.nextLine();
String str= sc.nextLine();
System.out.println(count(str));
System.out.println(count(str));
}
}
Output:
输出:
Enter a string: InterviewBit
输入一个字符串:InterviewBit
5
682. Write a program to replace the 2nd occurrence of the ‘e’ character in a string with ‘@’.
编写一个程序,将字符串中第2次出现的‘e’字符替换为‘@’。
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1858d557c902bb741a | 官方: 否 | 付费: 否
答案:
Let's consider a String str, a character array ch[], a number n, and a replacing character. In the string, we will replace the 2nd occurrence of a specific character i.e., e within the character array ch[] with the given replacement character i.e., ‘@’.
让我们考虑一个字符串str,一个字符数组ch[],一个数字n,以及一个替换字符。在字符串中,我们将把字符数组ch[]中特定字符(即e)的第2次出现替换为给定的替换字符(即‘@’)。
Code:
代码:
def replacer(original_str, ch, replacing_ch, occurrence):
def replacer(original_str, ch, replacing_ch, occurrence):
Breaking a string into individual characters
lt1 = list(original_str)
lt1 = list(original_str)
lt2 = list(ch)
lt2 = list(ch)
Loop to find and replace the character in the string
with the given replacing character
for i in lt2:
for i in lt2:
sub_str = i
sub_str = i
val = -1
val = -1
for i in range(0, occurrence):
for i in range(0, occurrence):
val = original_str.find(sub_str, val + 1)
val = original_str.find(sub_str, val + 1)
lt1[val] = replacing_ch
lt1[val] = replacing_ch
print(''.join(lt1))
print(''.join(lt1))
Driver Code:
if name == '__main__':
if name == '__main__':
original_str= 'InterviewBit'
original_str= 'InterviewBit'
ch = ['e']
ch = ['e']
occurrence = 2
occurrence = 2
replacing_ch = '@'
replacing_ch = '@'
replacer(original_str, ch, replacing_ch, occurrence)
replacer(original_str, ch, replacing_ch, occurrence)
Output:
输出:
Intervi@wBit
Intervi@wBit
Useful Interview Resources
有用的面试资源
- Technical Interview Questions
- Salesforce Interview Questions
- HR Interview Questions
- Java Interview Questions
- React Js Interview Questions
- Manual Testing Interview Questions
- Coding Interview Questions
683. Explain the dangling pointer.
解释悬空指针。
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1858d557c902bb741d | 官方: 否 | 付费: 否
答案:
Dangling pointers are among the most common errors associated with pointers and memory management. Dangling pointers point to memory locations that have been deleted (or freed). An error resulting from this condition is known as the Dangling Pointer Problem. In C, there are three different scenarios in which the pointer acts as a dangling pointer: - De-allocation of memory
悬空指针是与指针和内存管理相关的最常见错误之一。悬空指针指向已被删除(或释放)的内存位置。由这种情况导致的错误被称为悬空指针问题。在 C 语言中,有三种不同场景会导致指针成为悬空指针:- 内存释放
- Function Call
Variable goes out of scope
The occurrence of Dangling Pointers can also lead to some surprising errors during program execution, so we should ensure to avoid them when writing programs. Dangling pointer problems can be avoided by using static variables or by assigning NULL to the pointer while memory is being allocated.悬空指针的出现也可能在程序执行期间导致一些意外错误,因此我们在编写程序时应确保避免它们。可以通过使用静态变量或在分配内存时将指针赋值为 NULL 来避免悬空指针问题。
684. Write a program to find duplicate characters in a given string?
编写一个程序来查找给定字符串中的重复字符?
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1858d557c902bb7420 | 官方: 否 | 付费: 否
答案:
In order to identify the duplicate character in a string, we can count the number of times each character appears in the string. When the count is greater than 1, it indicates that a character has been inserted twice in the string. Below is a Java program to find duplicate characters in a given string.
为了识别字符串中的重复字符,我们可以统计每个字符在字符串中出现的次数。当计数大于 1 时,表示该字符在字符串中被插入了两次。以下是一个用于查找给定字符串中重复字符的 Java 程序。
Code:
代码:
import java.util.Scanner;
import java.util.Scanner;
public class Main
public class Main
{
public static void main(String[] args)
public static void main(String[] args)
{
String str;
String str;
Scanner sc=new Scanner(System.in);
Scanner sc=new Scanner(System.in);
System.out.print("Enter a String: ");
System.out.print("输入一个字符串: ");
str=sc.nextLine();
str=sc.nextLine();
int count;
int count;
//Converts a string into a character array
//将字符串转换为字符数组
char string[] = str.toCharArray();
char string[] = str.toCharArray();
System.out.println("Duplicate characters in the string: ");
System.out.println("字符串中的重复字符: ");
//Counts the characters in the string
//统计字符串中的字符
for(int i = 0; i <string.length; i++)
for(int i = 0; i <string.length; i++)
{
count = 1;
count = 1;
for(int j = i+1; j <string.length; j++)
for(int j = i+1; j <string.length; j++)
{
if(string[i] == string[j] && string[i] != ' ')
if(string[i] == string[j] && string[i] != ' ')
{
count++;
count++;
//Set string[j] to 0
//将string[j]设置为0
//to avoid printing visited character
//避免打印已访问的字符
string[j] = '0';
string[j] = '0';
}
}
//If the count is greater than 1
//如果计数大于1
//a character is considered duplicate
//则该字符被视为重复
if(count > 1 && string[i] != '0')
if(count > 1 && string[i] != '0')
System.out.println(string[i]);
System.out.println(string[i]);
}
}
}
Output:
输出:
Enter a String: InterviewBit
输入字符串:InterviewBit
Duplicate characters in the string:
字符串中的重复字符:
t
t
e
e
i
i
685. Write a program to reverse a given string without using reverse()?
编写一个程序,在不使用reverse()的情况下反转给定字符串?
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1858d557c902bb7423 | 官方: 否 | 付费: 否
答案:
The following methods are available for reversing a string in Java without using reverse(): - For loop
以下是在Java中不使用reverse()反转字符串的可用方法:- For循环
- While loop
Static method
Below is a Java program to reverse a given string using a while loop.下面是一个使用while循环反转给定字符串的Java程序。
Code:
代码:
import java.util.Scanner;
import java.util.Scanner;
public class Main
public class Main
{
public static void main(String args[])
public static void main(String args[])
{
String str;
String str;
Scanner sc=new Scanner(System.in);
Scanner sc=new Scanner(System.in);
System.out.print("Enter a String: ");
System.out.print("输入一个字符串: ");
str=sc.nextLine();
str=sc.nextLine();
System.out.print("Reversed string: ");
System.out.print("Reversed string: ");
int a=str.length(); //to find string length
int a=str.length(); //求字符串长度
while(a>0)
while(a>0)
{
//printing the character at index a-1
//打印索引为a-1处的字符
System.out.print(str.charAt(a-1));
System.out.print(str.charAt(a-1));
//decreasing the length of the string
//递减字符串长度
a--;
a--;
}
}
}
Output:
输出:
Enter a String: Scaler
输入一个字符串:Scaler
Reversed string: relacS
反转字符串:relacS
686. Write a program to print all the permutations of a string.
编写一个程序,打印一个字符串的所有排列。
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1858d557c902bb742f | 官方: 否 | 付费: 否
答案:
A permutation refers to all possible ways that a set of numbers or characters can be arranged. As an example, if a string is ‘KMG’, then all its permutations will be KMG, GMK, GKM, MKG, MGK.
排列指的是一个数字或字符集合所有可能的排列方式。例如,如果字符串是‘KMG’,那么它的所有排列将是KMG、GMK、GKM、MKG、MGK。
Code:
代码:
// C++ program to print permutations of a string
// C++程序,用于打印字符串的排列
include <bits/stdc++.h>
using namespace std;
using namespace std;
// x is a string
// x是一个字符串
// str is starting index of string
// str是字符串的起始索引
// end is ending index of string
// end是字符串的结束索引
void permute(string x, int str, int end)
void permute(string x, int str, int end)
{
// Base case
// 基础情况
if (str == end)
if (str == end)
cout<<x<<endl;
cout<<x<<endl;
else
else
{
// Permutations performed
// 已执行的排列
for (int i = str; i <= end; i++)
for (int i = str; i <= end; i++)
{
// Switching performed
// 执行的交换
swap(x[str], x[i]);
swap(x[str], x[i]);
// Recursion called
// 调用的递归
permute(x, str+1, end);
permute(x, str+1, end);
//backtrack
//回溯
swap(x[str], x[i]);
swap(x[str], x[i]);
}
}
}
int main()
int main()
{
string s;
string s;
cout << "Enter a string : " <<endl;
cout << "输入一个字符串:" <<endl;
cin >> s;
cin >> s;
cout << "Permutations of given string : " << endl;
cout << "给定字符串的排列:" << endl;
int n = s.size();
int n = s.size();
permute(s, 0, n-1);
permute(s, 0, n-1);
return 0;
return 0;
}
Output:
输出:
Enter a string : KMG
输入一个字符串:KMG
Permutations of given string :
给定字符串的排列:
KMG
KMG
KGM
KGM
MKG
MKG
MGK
MGK
GMK
GMK
GKM
GKM
687. Write code for printing pyramid pattern.
编写打印金字塔图案的代码。
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1858d557c902bb7437 | 官方: 否 | 付费: 否
答案:
Pattern program enhances coding skills, logic, and looping concepts. It is mostly asked in an interview to check the logic and thinking of the programmer. To learn the pattern program, we must have a deep knowledge of the loops, such as for loop, while loop, and do-while loop. Below is a C++ program to print a pyramid pattern using a while loop.
图案程序能提升编程技能、逻辑和循环概念。它在面试中常被用来检验程序员的逻辑和思维能力。要学习图案程序,我们必须深入了解循环,如for循环、while循环和do-while循环。下面是一个使用while循环打印金字塔图案的C++程序。
Code:
代码:
// C++ code print pyramid pattern
// C++代码打印金字塔图案
include
using namespace std;
using namespace std;
void pypart(int row)
void pypart(int row)
{
int i, j;
int i, j;
// Outer loop to handle number of rows
// 外层循环处理行数
for (int i = 0; i < row; i++)
for (int i = 0; i < row; i++)
{
// Inner loop to handle number spaces
// 内层循环处理空格数量
for (int j =row-i; j>1; j--)
for (int j =row-i; j>1; j--)
{
cout << " ";
cout << " ";
}
// Inner loop to handle number of columns
// 内层循环处理列数
for (int j = 0; j <= i; j++)
for (int j = 0; j <= i; j++)
{
cout << "* ";
cout << "* ";
}
cout << endl;
cout << endl;
}
}
// Driver Code
// 驱动代码
int main()
int main()
{
int row = 5;
int row = 5;
pypart(row);
pypart(row);
return 0;
return 0;
}
Output:
输出:
*
- *
- *
- *
- *
688. Why is C considered to be a middle-level language?
为什么C语言被认为是一种中级语言?
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1858d557c902bb743a | 官方: 否 | 付费: 否
答案:
C is considered to be a middle-level language because it provides features of both high-level and low-level languages, bridging the gap between low-level and high-level programming languages. The C language can be used for Application Programming (for generating customer billing systems) and System Programming (for generating operating systems).
C语言被认为是一种中级语言,因为它同时具备高级语言和低级语言的特点,填补了低级语言和高级编程语言之间的空白。C语言可用于应用程序编程(如生成客户计费系统)和系统编程(如生成操作系统)。
Low-level features of the C language - Supports Inline assembly language programs.
C语言的低级特点——支持内联汇编语言程序。
- C features inline assembly language, which lets us directly access system registers.
- C supports bit-level programming, which means we can modify and manipulate data at the bit level.
Memory can be accessed directly via a pointer. Dynamic memory allocation is therefore possible.
High-level features of the C language - Programs written in C are machine-independent, and therefore portable.C语言的高级特点——用C编写的程序与机器无关,因此具有可移植性。
- A wide range of functions, data types, operators, and data structures are built into C.
- There are high-level constructs such as if-else, do-while, etc.
- C is more readable and has a syntax similar to that of English.
689. What do you mean by reserved words?
保留字是什么意思?
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1858d557c902bb743d | 官方: 否 | 付费: 否
答案:
Reserved words (also known as reserved identifiers) in computer language refer to words that cannot be used as identifiers, such as the names of variables, functions, or labels -- they are "reserved". Therefore, avoid using reserved words as variable names. C has 32 keywords; each has a pre-defined meaning, and can't be used as a variable name. These keywords are known as reserved words.
计算机语言中的保留字(也称为保留标识符)是指不能用作标识符的单词,例如变量、函数或标签的名称——它们是“被保留的”。因此,避免使用保留字作为变量名。C语言有32个关键字;每个都有预定义的含义,不能用作变量名。这些关键字被称为保留字。
690. Can you initialize a variable when it is declared?
可以在声明变量时对其进行初始化吗?
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1858d557c902bb7443 | 官方: 否 | 付费: 否
答案:
Yes, you can initialize a variable when declaring it. It isn't necessary to write another assignment statement after the variable declaration unless you intend to change it later. Whenever a variable is declared, it should also be initialized. In initialization, a variable is given a value. As an example, char InterviewBit [20] = "Scaler"; It declares a string variable named InterviewBit, and then initializes it with a value of "Scaler".
是的,您可以在声明变量时对其进行初始化。除非您打算稍后更改它,否则不必在变量声明后编写另一个赋值语句。每当声明变量时,也应进行初始化。在初始化中,变量会被赋予一个值。例如,char InterviewBit[20] = "Scaler"; 这声明了一个名为InterviewBit的字符串变量,然后用值"Scaler"对其进行初始化。
691. What do you mean by Subnet?
子网是什么意思?
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1858d557c902bb7449 | 官方: 否 | 付费: 否
答案:
The term subnetwork or subnet refers to a logical subdivision of an IP network. Subnetting is a computer networking technique that divides a larger network address space into smaller, independent ones. With subnetting, a group of connected computers can operate as two or more independent networks. There is a separate network ID for each group.
术语子网络或子网指的是IP网络的逻辑细分。子网划分是一种计算机网络技术,将较大的网络地址空间划分为较小的、独立的地址空间。通过子网划分,一组连接的计算机可以作为两个或多个独立的网络运行。每个组都有一个单独的网络ID。
With subnetting, you can create multiple broadcast networks, which reduces network load and provides more security for users. Subnetting is used to create a fast, efficient, and resilient computer network.
通过子网划分,您可以创建多个广播网络,这减少了网络负载,并为用户提供了更多的安全性。子网划分用于创建快速、高效且具有弹性的计算机网络。
692. Explain Preprocessor Directives.
解释预处理器指令。
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1858d557c902bb744c | 官方: 否 | 付费: 否
答案:
Preprocessor directives are typically found at the top of the source code on a separate line, starting with the character "#", followed by the directive name and optional whitespace. Preprocessor directives are used to simplify the process of modifying and compiling source codes in different execution environments. It instructs the compiler to preprocess information before actual compilation begins. A preprocessor directive is not a statement, therefore it is not concluded with a semicolon (;). Some of the preprocessing directives available for C# include: - #define, #undef
预处理器指令通常位于源代码顶部单独一行,以“#”字符开头,后跟指令名称和可选的空白。预处理器指令用于简化在不同执行环境中修改和编译源代码的过程。它指示编译器在实际编译开始前预处理信息。预处理器指令不是语句,因此不以分号(;)结尾。C# 中可用的预处理指令包括:- #define, #undef
error, #warning
region, #endregion
if, #elif, #else, #endif
693. Can you explain FIFO?
您能解释FIFO吗?
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1858d557c902bb744f | 官方: 否 | 付费: 否
答案:
FIFO (First In First Out) is a method for handling data structures that process the first element (oldest) first and the newest element last. As we enter data elements into a data structure, the element added last in any structure is removed last and the element added first is removed first. A fair chance is given to each data element here; the first element to enter gets the chance to exit first. Essentially, it is analogous to serving people in a queue on an FCFS (first-come, first-served) basis, i.e., in the same order/sequence as they arrive at the tail of the queue.
FIFO(先进先出)是一种处理数据结构的方法,首先处理第一个(最旧的)元素,最后处理最新的元素。当我们将数据元素输入数据结构时,在任何结构中最后添加的元素最后被移除,最先添加的元素最先被移除。这里每个数据元素都有公平的机会;第一个进入的元素有机会最先退出。本质上,它类似于在队列中按FCFS(先到先得)原则为人们提供服务,即按照他们到达队列尾部的相同顺序/序列进行。
694. Explain different types of control structures in Programming.
解释编程中不同类型的控制结构。
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1858d557c902bb7452 | 官方: 否 | 付费: 否
答案:
In programs, control structures are simply ways of specifying the flow of control. Sequence, Selection, and Repetition are the three main control structures in programming. - Sequential: It executes statements line-by-line in the same order as they appear in the program. The execution of a program follows a top-to-bottom flow, where step 1 is first executed, followed by 2, and so on until the last step is performed.
在程序中,控制结构简单来说就是指定控制流的方式。顺序、选择和重复是编程中的三种主要控制结构。- 顺序:它按照语句在程序中出现的顺序逐行执行。程序执行遵循从上到下的流程,先执行步骤1,接着执行步骤2,依此类推,直到执行完最后一步。
- Selection: Selection control structures select the execution path based on the conditions defined in the program. It involves conditional statements, which means code is executed based upon evaluations of conditions as TRUE or FALSE. As a result, not all codes will be executed, and there are alternative flows to consider.
- Repetitions: Iterative structures, or repetitive control structures, are groups of codes that repeat a set of related statements until some condition or control value causes the repetition to stop or cease. Simply put, it is a method of repeating a piece of code several times.
695. What are different types of Polymorphism?
多态有哪些不同类型?
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1858d557c902bb7455 | 官方: 否 | 付费: 否
答案:
Types of polymorphism in Java:
Java中多态的类型:
- Compile-time (Static or early binding) polymorphism: It is also referred to as early binding/static polymorphism. It refers to the binding of an object with its functionality at compile time. Java determines which method to call based on the method signature at compile time. It is achieved by method overloading.
- Runtime (Dynamic) polymorphism: It is also referred to as late binding /dynamic polymorphism. It refers to the binding of an object with its functionality at runtime. It is achieved by method overriding.
696. What is the Eligibility Criteria at Persistent?
Persistent公司的资格标准是什么?
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1958d557c902bb7494 | 官方: 否 | 付费: 否
答案:
The following are the eligibility criteria for Software Engineer Associates at Persistent:
以下是Persistent公司软件工程师助理的资格标准:
| Eligibility Criteria 资格标准 | Details 详情 |
|---|---|
| Graduation 学历 | Eligible: BE/ME/B.Tech/M.Tech/BCA/MCA 合格:BE/ME/B.Tech/M.Tech/BCA/MCA |
| Academic and Graduation Criteria 学业和毕业标准 | 60% or 6.0 CGPA throughout 10th, 12th, and UG/PG 10年级、12年级和本科/研究生阶段成绩达到60%或6.0 CGPA |
| Backlogs 挂科 | No active/current Backlogs 无当前或未决的挂科记录 |
697. How long is the Interview Process at Persistent?
Persistent公司的面试流程有多长?
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1958d557c902bb7497 | 官方: 否 | 付费: 否
答案:
A total of 3 rounds are involved in the hiring process; a written test, a technical interview, and an HR interview. Generally, Persistent officials follow this interview process; however, in some cases, more rounds may be needed based on your experience, the job profile you hold, and the company's requirements. If a person has cleared all rounds, he or she can expect to receive an offer letter in approximately 5–7 working days.
招聘流程共包括3轮:笔试、技术面试和HR面试。通常,Persistent公司遵循这一面试流程;但在某些情况下,根据你的经验、所担任的职位以及公司的要求,可能需要更多轮次。如果候选人通过了所有轮次,预计在约5-7个工作日内收到录用通知书。
698. Does persistent hire off-campus?
Persistent公司会招聘非校园候选人吗?
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1958d557c902bb749a | 官方: 否 | 付费: 否
答案:
It's true, Persistent also hires off-campus. Occasionally, the company recruits graduates/ fresh engineers off-campus.
确实如此,Persistent公司也招聘非校园候选人。公司偶尔会招聘非校园的毕业生或新工程师。
699. Is Persistent interview tough?
Persistent公司的面试难吗?
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1958d557c902bb749d | 官方: 否 | 付费: 否
答案:
The persistent interview is pretty straightforward and the overall difficulty level is very basic. One can crack the interview by having good programming and computer science skills. Being prepared is key to a successful job interview so that you appear relaxed, calm, and collected to the employer, which is what the employer wants in an ideal candidate.
Persistent公司的面试相当直接,整体难度水平非常基础。拥有良好的编程和计算机科学技能,就能通过面试。充分准备是成功求职面试的关键,这样你在雇主面前会显得放松、冷静和镇定,而这正是雇主在理想候选人身上所期望的。
700. What type of company is persistent?
Persistent公司是什么类型的公司?
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1958d557c902bb74a0 | 官方: 否 | 付费: 否
答案:
Persistent is a product-based company that offers great growth opportunities, internal migration, work-life balance, and an excellent corporate culture. It also offers a good promotion cycle as well as incremental growth.
Persistent是一家产品型公司,提供巨大的成长机会、内部调动、工作生活平衡和优秀的企业文化。它还提供良好的晋升周期以及渐进式增长。
701. How is it working in persistent?
在Persistent工作体验如何?
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1958d557c902bb74a3 | 官方: 否 | 付费: 否
答案:
Persistent is a great workplace, with ample learning opportunities for career development. Persistent has an inclusive work environment, a great training team, a diverse portfolio of projects, and a work culture that supports personal growth.
Persistent 是一个很棒的工作场所,为职业发展提供了充足的学习机会。Persistent 拥有包容的工作环境、优秀的培训团队、多样化的项目组合,以及支持个人成长的工作文化。
702. What is the salary for freshers in Persistent?
Persistent 对应届生的薪资是多少?
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1958d557c902bb74a6 | 官方: 否 | 付费: 否
答案:
Persistent package for freshers starts at Rs. 4,71,000 and goes up to Rs. 12,41,000. An entry-level Software Engineer with less than one year of experience is expected to earn an average salary of Rs. 441,767.
Persistent 对应届生的薪资范围从 471,000 卢比起,最高可达 1,241,000 卢比。经验不足一年的初级软件工程师预计平均薪资为 441,767 卢比。
703. Why Persistent?
为什么选择 Persistent?
- 知识点: 其他/未分类 (标签: interviewbit, persistent, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Persistent Systems
- id: 69b37c1958d557c902bb74a9 | 官方: 否 | 付费: 否
答案:
Persistent is regularly rated as a leader in the field of Digital Engineering and specializes in technology innovation and software product services. The company offers plenty of opportunities and good exposure to the latest technologies to its employees. Apart from training employees in different technologies, the company is also involved in supporting their overall development with a range of other activities. Having the opportunity to work on good client projects and job security has been the most rewarding aspect. Furthermore, Persistent offers competitive salaries as well.
Persistent 经常被评为数字工程领域的领导者,专注于技术创新和软件产品服务。公司为员工提供大量机会和接触最新技术的良好平台。除了培训员工掌握不同技术外,公司还通过一系列其他活动支持员工的全面发展。有机会参与优质客户项目和工作稳定性是最有价值的方面。此外,Persistent 还提供具有竞争力的薪资。
704. What is a DMZ? Why is it used?
什么是 DMZ?为什么使用它?
- 知识点: 其他/未分类 (标签: interviewbit, publicis-sapient, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Publicis Sapient
- id: 69b37c2058d557c902bb7a1e | 官方: 否 | 付费: 否
答案:
A DMZ (Demilitarized Zone) is a network segment that is used to isolate a network or a device from external threats. A DMZ is typically located between a trusted network, such as a corporate network, and an untrusted network, such as the internet. The purpose of a DMZ is to provide an additional layer of security between these networks and to protect the trusted network from external threats.
DMZ(非军事区)是一种网络分段,用于将网络或设备与外部威胁隔离。DMZ 通常位于可信网络(如企业网络)和不可信网络(如互联网)之间。DMZ 的目的是在这些网络之间提供额外的安全层,并保护可信网络免受外部威胁。
There are several ways in which a DMZ can be used to enhance security: - Access control: A DMZ can be used to control access to a network or a device by limiting the types of traffic that are allowed to pass through the DMZ. For example, a DMZ may allow incoming traffic from the internet but may block outgoing traffic from the trusted network to the internet.
有多种方式可以使用 DMZ 来增强安全性:- 访问控制:DMZ 可通过限制允许通过 DMZ 的流量类型来控制对网络或设备的访问。例如,DMZ 可能允许来自互联网的入站流量,但阻止从可信网络到互联网的出站流量。
- Network isolation: A DMZ can be used to isolate a network or a device from external threats, by allowing traffic to pass through the DMZ, but not directly between the trusted and untrusted networks. This can help to prevent external threats from reaching the trusted network, and can also help to contain any threats that may originate from the trusted network.
Public services: A DMZ can be used to host public services, such as a website or a mail server, that need to be accessible from the internet. By hosting these services in the DMZ, they can be accessed by external users without exposing the trusted network to external threats.
A DMZ is a network segment that is used to isolate a network or a device from external threats, and to provide an additional layer of security between a trusted and an untrusted network. It is often used to control access to a network, to isolate a network from external threats, and to host public services that need to be accessible from the internet.DMZ(隔离区)是一种网络段,用于将网络或设备与外部威胁隔离,并在可信网络与不可信网络之间提供额外的安全层。它常用于控制对网络的访问、将网络与外部威胁隔离,以及托管需要从互联网访问的公共服务。
Additional Resources
其他资源
- https://www.interviewbit.com/technical-interview-questions/
- https://www.interviewbit.com/data-engineer-interview-questions/
- https://www.interviewbit.com/front-end-developer-interview-questions/
- https://www.interviewbit.com/qa-interview-questions/
- https://www.interviewbit.com/data-science-interview-questions/
- https://www.interviewbit.com/hr-interview-questions/
- https://www.interviewbit.com/selenium-interview-questions/
- https://www.interviewbit.com/java-interview-questions/
- https://www.interviewbit.com/software-testing-interview-questions/
705. What is a protocol? Give some examples.
什么是协议?请举一些例子。
- 知识点: 其他/未分类 (标签: interviewbit, publicis-sapient, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Publicis Sapient
- id: 69b37c2058d557c902bb7a21 | 官方: 否 | 付费: 否
答案:
A protocol is a set of rules and standards that govern how devices communicate with each other over a network. Protocols define the format and meaning of the messages that are exchanged between devices, as well as the rules for how these messages should be transmitted and received.
协议是一组规则和标准,用于规定设备如何通过网络相互通信。协议定义了设备之间交换消息的格式和含义,以及这些消息应如何传输和接收的规则。
There are many different types of protocols, and they are used in a variety of contexts, including computer networking, internet communication, and electronic communication. Some examples of protocols include: - TCP/IP: The Transmission Control Protocol/Internet Protocol (TCP/IP) is a set of protocols that are used to connect devices on the internet and to transmit data between them. TCP/IP defines the rules for how data is formatted and transmitted over the internet, and is the foundation of the internet as we know it today.
协议有多种不同类型,它们应用于各种场景,包括计算机网络、互联网通信和电子通信。协议的一些示例包括:- TCP/IP:传输控制协议/互联网协议(TCP/IP)是一组用于在互联网上连接设备并在它们之间传输数据的协议。TCP/IP 定义了数据在互联网上如何格式化和传输的规则,并且是当今互联网的基础。
- HTTP: The Hypertext Transfer Protocol (HTTP) is a protocol that is used to transmit data over the web. HTTP defines the rules for how web browsers and web servers communicate with each other and exchange data and is the basis for the web as we know it today.
- SMTP: The Simple Mail Transfer Protocol (SMTP) is a protocol that is used to transmit email messages between servers. SMTP defines the rules for how email messages are formatted and transmitted, and is a critical component of the email infrastructure.
FTP: The File Transfer Protocol (FTP) is a protocol that is used to transfer files between computers over a network. FTP defines the rules for how files are formatted and transmitted, and is a common way to transfer large files between devices.
Protocols are essential for enabling communication and data exchange between devices on a network. They define the rules and standards that devices must follow in order to communicate with each other, and are a critical component of many different types of systems and networks.协议对于实现网络上设备之间的通信和数据交换至关重要。它们定义了设备必须遵循的规则和标准才能相互通信,并且是许多不同类型的系统和网络的关键组成部分。
706. What is a switch? How does it differ from a hub?
什么是交换机?它与集线器有何不同?
- 知识点: 其他/未分类 (标签: interviewbit, publicis-sapient, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Publicis Sapient
- id: 69b37c2058d557c902bb7a26 | 官方: 否 | 付费: 否
答案:
A switch is a networking device that is used to connect devices on a network and to forward data packets between them. A switch operates at the data link layer of the OSI model and is responsible for forwarding data packets between devices on the same network based on their destination addresses.
交换机是一种网络设备,用于连接网络上的设备并在它们之间转发数据包。交换机在 OSI 模型的数据链路层工作,负责根据目的地址在同一网络上的设备之间转发数据包。
A hub is a networking device that is used to connect devices on a network and to forward data packets between them. Like a switch, a hub operates at the data link layer of the OSI model and is responsible for forwarding data packets between devices on the same network.
集线器是一种网络设备,用于连接网络上的设备并在它们之间转发数据包。与交换机一样,集线器在 OSI 模型的数据链路层工作,负责在同一网络上的设备之间转发数据包。
There are several key differences between a switch and a hub: - Address forwarding: A switch forwards data packets based on the destination address of the packet, while a hub forwards data packets to all connected devices regardless of their destination addresses.
交换机和集线器之间有几个关键区别:- 地址转发:交换机根据数据包的目的地址转发数据包,而集线器则将所有数据包转发给所有连接的设备,无论其目的地址如何。
- Performance: A switch is generally faster than a hub, as it is able to forward data packets more efficiently by only sending them to the intended destination device. A hub, on the other hand, broadcasts data packets to all connected devices, which can lead to slower performance.
- Intelligence: A switch is generally more intelligent than a hub, as it is able to learn the addresses of connected devices and build a forwarding table to optimize data forwarding. A hub, on the other hand, simply broadcasts data packets to all connected devices.
Cost: Switches are generally more expensive than hubs, as they offer more advanced features and higher performance.
while both switches and hubs are used to connect devices on a network and forward data packets between them, they differ in terms of their performance, intelligence, and cost. Switches are generally faster and more intelligent than hubs, but are also more expensive.虽然交换机和集线器都用于连接网络上的设备并在它们之间转发数据包,但它们在性能、智能性和成本方面有所不同。交换机通常比集线器更快、更智能,但也更昂贵。
707. What is a router? How does it work?
什么是路由器?它是如何工作的?
- 知识点: 其他/未分类 (标签: interviewbit, publicis-sapient, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Publicis Sapient
- id: 69b37c2058d557c902bb7a29 | 官方: 否 | 付费: 否
答案:
A router is a networking device that is used to connect different networks and to forward data packets between them. A router operates at the network layer of the OSI model and is responsible for routing data packets between devices on different networks based on their destination addresses.
路由器是一种网络设备,用于连接不同的网络并在它们之间转发数据包。路由器在 OSI 模型的网络层工作,负责根据目的地址在不同网络上的设备之间路由数据包。
To understand how a router works, it is helpful to understand the following key concepts: - Network layer: As mentioned above, the network layer is responsible for routing data between devices on different networks. A router operates at this layer and uses routing protocols to determine the best path for data packets to take between networks.
要理解路由器的工作原理,了解以下关键概念会有所帮助:- 网络层:如上所述,网络层负责在不同网络上的设备之间路由数据。路由器在这一层工作,并使用路由协议来确定数据包在网络之间传输的最佳路径。
- Routing table: A routing table is a data structure that is used by a router to store information about the networks it is connected to, and the paths that data packets should take to reach these networks. A router updates its routing table based on the information it receives from other routers and devices on the network.
Forwarding: When a router receives a data packet, it looks up the destination address of the packet in its routing table and determines the best path to forward the packet to its destination. The router then sends the packet to the next hop on this path, which may be another router or a final destination device.
A router is a critical component of a network that enables devices on different networks to communicate with each other and exchange data. It does this by routing data packets between networks based on their destination addresses, and by using routing protocols and routing tables to determine the best path for the packets to take.路由器是网络的关键组成部分,它使不同网络上的设备能够相互通信并交换数据。它通过根据目的地址在网络之间路由数据包,并使用路由协议和路由表来确定数据包传输的最佳路径来实现这一点。
708. Explain the OSI model and its layers?
解释OSI模型及其各层?
- 知识点: 其他/未分类 (标签: interviewbit, publicis-sapient, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Publicis Sapient
- id: 69b37c2058d557c902bb7a2c | 官方: 否 | 付费: 否
答案:
The OSI (Open Systems Interconnection) model is a framework for understanding how different systems and devices communicate with each other over a network. The OSI model divides the process of communication into seven layers, each of which performs a specific function in the process of transmitting and receiving data.
OSI(开放系统互连)模型是一个框架,用于理解不同系统和设备如何通过网络相互通信。OSI模型将通信过程分为七层,每层在发送和接收数据的过程中执行特定功能。
The seven layers of the OSI model are:
OSI模型的七层是:
Physical Layer: This layer is responsible for transmitting raw data over a physical medium, such as a cable or wireless connection. It defines the electrical, mechanical, and functional characteristics of the physical connection. 2. Data Link Layer: This layer is responsible for organizing the raw data into frames, and for providing error detection and correction for the data. It also defines how devices on the network can access the physical medium and transmit data. 3. Network Layer: This layer is responsible for routing data between devices on the network, and for providing logical addressing and routing services. It defines how data is routed between devices, and how devices can communicate with each other.
- 物理层:该层负责通过物理介质(如电缆或无线连接)传输原始数据。它定义了物理连接的电气、机械和功能特性。 2. 数据链路层:该层负责将原始数据组织成帧,并提供数据的错误检测和纠正。它还定义了网络上的设备如何访问物理介质并传输数据。 3. 网络层:该层负责在网络中的设备之间路由数据,并提供逻辑寻址和路由服务。它定义了数据如何在设备之间路由,以及设备如何相互通信。
In addition to routing data between devices and providing logical addressing and routing services, the Network Layer is also responsible for encapsulating data into packets and ensuring that packets are delivered to their intended destination.
除了在设备之间路由数据和提供逻辑寻址及路由服务外,网络层还负责将数据封装成数据包,并确保数据包被传送到预期目的地。
Encapsulation is the process of adding protocol headers and trailers to the data as it moves through the network. These headers and trailers contain information such as source and destination addresses, packet sequence numbers, and error-checking codes. The Network Layer uses this information to route packets through the network to their intended destination.
封装是在数据通过网络移动时向数据添加协议头和协议尾的过程。这些头和尾包含源地址和目的地址、数据包序列号以及错误检查代码等信息。网络层使用这些信息通过网络将数据包路由到其预期目的地。
The Network Layer also provides services for managing network congestion and ensuring the reliable delivery of packets. For example, it may use congestion control algorithms to prevent network congestion and packet loss, and it may use error correction codes to detect and correct errors in packet transmissions.
网络层还提供管理网络拥塞和确保数据包可靠传输的服务。例如,它可能使用拥塞控制算法来防止网络拥塞和数据包丢失,并可能使用纠错码来检测和纠正数据包传输中的错误。
Overall, the Network Layer plays a critical role in ensuring that data is transmitted reliably and efficiently across the network, and in enabling devices to communicate with each other using logical addressing and routing services.
总的来说,网络层在确保数据跨网络可靠高效传输,以及使设备能够使用逻辑寻址和路由服务相互通信方面发挥着关键作用。
Transport Layer: This layer is responsible for providing end-to-end transmission of data, and for ensuring that data is delivered reliably and efficiently. It also provides flow control and error recovery services. 2. Session Layer: This layer is responsible for establishing, maintaining, and terminating communication sessions between devices. It also provides synchronization and checkpointing services to ensure data integrity. 3. Presentation Layer: This layer is responsible for translating and formatting data in a way that is appropriate for the receiving device. It also provides encryption and compression services to protect data privacy and optimize transmission. 4. Application Layer: This layer is responsible for providing services to user applications and for defining how applications can access the network. It provides the interface between the network and the application and defines how applications can send and receive data.
- 传输层:该层负责提供数据的端到端传输,并确保数据可靠高效地交付。它还提供流量控制和错误恢复服务。 2. 会话层:该层负责在设备之间建立、维护和终止通信会话。它还提供同步和检查点服务以确保数据完整性。 3. 表示层:该层负责以适合接收设备的方式转换和格式化数据。它还提供加密和压缩服务以保护数据隐私并优化传输。 4. 应用层:该层负责向用户应用程序提供服务,并定义应用程序如何访问网络。它提供网络与应用程序之间的接口,并定义应用程序如何发送和接收数据。
OSI model provides a standardized way of understanding how different systems and devices communicate with each other over a network and helps to ensure that different systems and devices can interoperate with each other. It is a widely-used and influential model in computer networking.
OSI模型提供了一种标准化的方式来理解不同系统和设备如何通过网络相互通信,并有助于确保不同系统和设备能够相互互操作。它是计算机网络中广泛使用且有影响力的模型。
709. What is a network? How does it differ from a system?
什么是网络?它与系统有何不同?
- 知识点: 其他/未分类 (标签: interviewbit, publicis-sapient, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Publicis Sapient
- id: 69b37c2058d557c902bb7a2f | 官方: 否 | 付费: 否
答案:
In computer science, a network is a collection of interconnected computers and devices that can communicate with each other to exchange data and resources. Networks can be classified based on their size, scope, and purpose, and can be as small as a home network with a few devices, or as large as the internet, which connects billions of devices worldwide.
在计算机科学中,网络是相互连接的计算机和设备的集合,这些计算机和设备可以相互通信以交换数据和资源。网络可以根据其大小、范围和目的进行分类,小到由少量设备组成的家庭网络,大到连接全球数十亿设备的互联网。
A system, on the other hand, is a collection of interconnected components that work together to achieve a common goal or purpose. A system can be as simple as a mechanical system with a few parts or as complex as a computer system with hardware, software, and data.
另一方面,系统是为实现共同目标或目的而协同工作的相互连接组件的集合。系统可以简单到由少量部件组成的机械系统,也可以复杂到由硬件、软件和数据组成的计算机系统。
There are several key differences between a network and a system: - Size: Networks are typically larger than systems, and can encompass multiple systems and devices.
网络和系统之间有几个关键区别:- 规模:网络通常比系统更大,可以包含多个系统和设备。
- Scope: Networks often have a wider scope than systems, and can connect devices and systems across geographical distances.
- Purpose: Networks are often used to exchange data and resources between devices and systems, while systems are designed to achieve a specific goal or purpose.
Interconnections: Networks are typically characterized by the interconnections between devices and systems, while systems are characterized by the interactions between their components.
while networks and systems have some similarities, they are distinct concepts that play different roles in computer science. Networks are used to connect devices and systems, while systems are used to achieve specific goals or purposes.虽然网络和系统有一些相似之处,但它们是不同的概念,在计算机科学中扮演不同的角色。网络用于连接设备和系统,而系统用于实现特定目标或目的。
710. Can you explain the difference between a shallow and a deep copy?
你能解释一下浅拷贝和深拷贝之间的区别吗?
- 知识点: 其他/未分类 (标签: interviewbit, publicis-sapient, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Publicis Sapient
- id: 69b37c2058d557c902bb7a50 | 官方: 否 | 付费: 否
答案:
In Python, a shallow copy is a copy of an object that creates a new object with a new reference to the same underlying data, but does not create new copies of the data itself. A deep copy, on the other hand, creates a new object with a new reference to new copies of the data, as well as new copies of any nested objects within the original object.
在Python中,浅拷贝是创建对象的一个副本,它生成一个新对象,其对底层数据有新的引用,但不会创建数据本身的新副本。相比之下,深拷贝则创建新对象,并对数据的新副本以及原始对象内任何嵌套对象的新副本都有新的引用。
Here is an example to illustrate the difference between a shallow and a deep copy in Python:
以下是一个示例,用以说明Python中浅拷贝和深拷贝的区别:
import copy
import copy
Create a list with nested lists
original_list = [[1, 2, 3], [4, 5, 6]]
original_list = [[1, 2, 3], [4, 5, 6]]
Create a shallow copy of the list
shallow_copy = copy.copy(original_list)
shallow_copy = copy.copy(original_list)
Create a deep copy of the list
deep_copy = copy.deepcopy(original_list)
deep_copy = copy.deepcopy(original_list)
Modify the original list
original_list0 = 7
original_list0 = 7
print(original_list) # [[7, 2, 3], [4, 5, 6]]
print(original_list) # [[7, 2, 3], [4, 5, 6]]
print(shallow_copy) # [[7, 2, 3], [4, 5, 6]]
print(shallow_copy) # [[7, 2, 3], [4, 5, 6]]
print(deep_copy) # [[1, 2, 3], [4, 5, 6]]
print(deep_copy) # [[1, 2, 3], [4, 5, 6]]
In this example, the original list contains two nested lists. When the shallow copy is created, a new object is created with a new reference to the same data, but the nested lists are not copied. When the deep copy is created, a new object is created with a new reference to new copies of the data, including the nested lists. When the original list is modified, the changes are reflected in the shallow copy but not in the deep copy.
在此示例中,原始列表包含两个嵌套列表。创建浅拷贝时,会生成一个新对象,并对相同数据有新的引用,但不会复制嵌套列表。创建深拷贝时,会生成一个新对象,对数据的新副本(包括嵌套列表)有新的引用。修改原始列表时,更改会反映在浅拷贝中,但不会反映在深拷贝中。
711. How long is the Publicis Sapient Interview process?
阳狮思特的面试流程需要多长时间?
- 知识点: 其他/未分类 (标签: interviewbit, publicis-sapient, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Publicis Sapient
- id: 69b37c2158d557c902bb7a8d | 官方: 否 | 付费: 否
答案:
The length of the Publicis Sapient software engineer interview process varies depending on the position you are applying for and the hiring team you are working with. In general, the software engineer interview process at Publicis Sapient From interview to offer, the process can take 2-4 weeks .
阳狮思特软件工程师面试流程的长度取决于你申请的职位和你合作的招聘团队。一般来说,在阳狮思特,从面试到录用通知,软件工程师面试流程可能需要2-4周。
712. Does Publicis Sapient pay well?
阳狮 Sapient 的薪资待遇好吗?
- 知识点: 其他/未分类 (标签: interviewbit, publicis-sapient, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Publicis Sapient
- id: 69b37c2158d557c902bb7a90 | 官方: 否 | 付费: 否
答案:
The average salary for a Software Engineer at Publicis Sapient is ₹10,23,374 per year. However, the salary for this role can range from ₹1,29,974 to ₹60,96,387 per year.
阳狮 Sapient 软件工程师的平均年薪为 10,23,374 印度卢比。不过,该职位的年薪范围可能在 1,29,974 至 60,96,387 印度卢比之间。
713. Why do you want to join Sapient?
你为什么想加入 Sapient?
- 知识点: 其他/未分类 (标签: interviewbit, publicis-sapient, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Publicis Sapient
- id: 69b37c2158d557c902bb7a93 | 官方: 否 | 付费: 否
答案:
There are several reasons why I would like to join Publicis Sapient. - First, I am very impressed by the company's track record of delivering innovative solutions to its clients. I believe that working at Publicis Sapient would give me the opportunity to learn from and collaborate with some of the most talented professionals in the industry, and to contribute to the development of cutting-edge solutions that have a real impact on businesses and organizations.
我有很多想加入阳狮 Sapient 的理由。- 首先,该公司为客户提供创新解决方案的过往业绩给我留下了深刻印象。我相信,在阳狮 Sapient 工作能让我有机会向业内一些最优秀的专业人士学习并与他们合作,同时为开发能对企业和组织产生实际影响的前沿解决方案做出贡献。
- Second, I am attracted to the company's culture of innovation and continuous learning. Publicis Sapient places a strong emphasis on staying up-to-date with the latest technologies and trends and provides its employees with numerous opportunities for learning and development. I believe that working at Publicis Sapient would allow me to constantly challenge myself and grow as a professional.
- Finally, I am drawn to the company's values and commitment to diversity and inclusion. I believe that Publicis Sapient's commitment to creating a welcoming and inclusive environment is crucial to its success, and I would be proud to be a part of a company that values diversity and promotes equal opportunities.
- I have the ability to learn quickly and adapt to new situations, which would make me a valuable asset to the team, able to take on new projects and technologies as they arise. I believe that my knowledge, skills, and ability to learn and adapt quickly would make me a valuable asset to Publicis Sapient and enable me to contribute to the company's continued success in delivering innovative solutions to its clients.
- Overall, I believe that joining Publicis Sapient would be a fantastic opportunity for me to grow as a professional, work with some of the best and brightest in the industry, and contribute to the development of innovative solutions that have a real impact on businesses and organizations.
714. Is Publicis Sapient interview hard?
阳狮 Sapient 的面试难吗?
- 知识点: 其他/未分类 (标签: interviewbit, publicis-sapient, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Publicis Sapient
- id: 69b37c2158d557c902bb7a96 | 官方: 否 | 付费: 否
答案:
In an Indeed study, most respondents indicated the difficulty of their interview at Publicis Sapient was medium. Indeed's study asked 59 people if they thought their interview at Publicis Sapient was a fair appraisal of their abilities. Yes, 95% of the time.
在一项 Indeed 的研究中,大多数受访者表示阳狮 Sapient 面试的难度为中等。Indeed 的研究询问了 59 人,他们是否认为自己在阳狮 Sapient 的面试是对其能力的公平评估。其中 95% 的人回答“是”。
To prepare for a technical coding interview at Publicis Sapient, it is important to review the core concepts of your field, practice coding, and be familiar with the tools and technologies that are used at the company. It is also important to stay calm and focused during the interview and to clearly communicate your solution to the interviewer.
要准备阳狮 Sapient 的技术编码面试,复习所在领域的核心概念、练习编码、熟悉公司使用的工具和技术都非常重要。在面试过程中保持冷静和专注,并清晰地向面试官传达你的解决方案,也同样关键。
715. There are 9 coins and a weighing balance. 8 coins are of the same weight and 1 coin is heavier. In how many minimum numbers of iterations can you find out the heaviest coin in the worst case?
有 9 枚硬币和一个称重天平。其中 8 枚硬币重量相同,1 枚硬币更重。在最坏情况下,最少需要多少次称量才能找出最重的硬币?
- 知识点: 其他/未分类 (标签: interviewbit, pwc, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 普华永道
- id: 69b37c2258d557c902bb7b1c | 官方: 否 | 付费: 否
答案:
Most people try to divide the coins into 2 groups. But the trick here is to divide them into 3 groups. The reason being if we divide coins into 2 groups and weigh them, we can only discard one group. But if we divide them into 3 groups and weigh 2 groups, either they both will be equal or not. If both are equal then the coin with heavier weight will be on the left out group and if they both are not equal then the heavier weight group contains the coin with heavier weight. We can discard 2 groups out of the 3 groups in this case. Hence we first divide 9 coins into 3 equal groups. - In the first iteration, we can discard 2 groups out of them using the above concept.
大多数人会尝试将硬币分成2组。但这里的技巧是将其分成3组。原因在于,如果我们把硬币分成2组进行称重,只能排除一组。但如果我们分成3组并称重其中的2组,要么两组平衡,要么不平衡。如果两者平衡,则较重的硬币在剩下的那一组中;如果两者不平衡,则较重的那一组中含有较重的硬币。在这种情况下,我们可以从3组中排除2组。因此,我们首先将9枚硬币分成3个相等的组。- 在第一次迭代中,我们可以利用上述概念排除其中2组。
- We will be left with 3 coins now.
- Now we again divide them into 3 equal groups with 1 coin in each group.
- In the second iteration, we can again discard 2 groups and hence will be able to find the heavier coin.
- So, it takes only 2 iterations to find out the heavier coin.
716. Print 1-100 without using loops?
不用循环打印1-100?
- 知识点: 其他/未分类 (标签: interviewbit, pwc, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 普华永道
- id: 69b37c2258d557c902bb7b22 | 官方: 否 | 付费: 否
答案:
To print 1-100 without loop, we can leverage recursion for this.
要在不用循环的情况下打印1-100,我们可以利用递归来实现。
include
void printVal(int i)
void printVal(int i)
{
if(i > 100)
if(i > 100)
return;
return;
std::cout<<i<<"\n";
std::cout<<i<<"\n";
printVal(++i);
printVal(++i);
}
int main() {
int main() {
int i = 1;
int i = 1;
printVal(i);
printVal(i);
}
717. What is the output of the following code:
以下代码的输出是什么:
- 知识点: 其他/未分类 (标签: interviewbit, pwc, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: 普华永道
- id: 69b37c2258d557c902bb7b26 | 官方: 否 | 付费: 否
答案:
int main() {
int main() {
for(;;)
for(;;)
std::cout<<"hello\n";
std::cout<<"hello\n";
}
Let us see what for does.
让我们看看for循环是怎么工作的。
for loop does 3 things, initialization, condition check and expression to evaluate before running the next iteration. These 3 things are separated by a semicolon (;). Whatever logic is needed inside for loop is placed inside parenthesis. If we have a single line body then this single line can follow for loop without having the parenthesis. One more thing to note is that when the condition check is empty, it is replaced by a non-zero constant by the compiler.
for 循环做三件事:初始化、条件检查和在下一次迭代前要求值的表达式。这三部分由分号(;)分隔。for 循环内需要的逻辑放在 括号中。如果循环体只有一行,则该行可以直接跟在 for 循环后面,而无需使用 括号。还需注意一点:当条件检查为空时,编译器会将其替换为一个非零常量。
for(;;) // This is fine because condition is replaced by nonzero-constant by compiler as per the specification of C++ language
for(;;) // 这是合法的,因为根据 C++ 语言规范,编译器会将条件替换为非零常量
while() // This gives an error as it doesn't have condition expression
while() // 这会产生错误,因为它没有条件表达式
if() // This also gives an error as it doesn't have condition expression
if() // 这也会产生错误,因为它没有条件表达式
Here, in this case, the initialization is empty, condition check is empty and the expression to evaluate before running the next iteration is also empty and has a single line body of the print statement.
在此情况下,初始化、条件检查和下次迭代前要求值的表达式都为空,并且打印语句是单行循环体。
As the condition is replaced by a non-zero constant by the compiler, it is always evaluated to true and hence the loop runs on forever. So an infinite loop printing Hello on the screen.
因为编译器将条件替换为非零常量,所以该条件始终为真,循环因此无限运行。因此,屏幕上会无限打印“Hello”。
718. What is a dangling pointer? How to handle it?
什么是悬空指针?如何处理它?
- 知识点: 其他/未分类 (标签: interviewbit, pwc, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 普华永道
- id: 69b37c2258d557c902bb7b29 | 官方: 否 | 付费: 否
答案:
A dangling pointer is a pointer pointing to a location that was already freed. De-referencing a dangling pointer causes undefined behaviour.
悬空指针是指向已被释放内存位置的指针。对悬空指针进行解引用会导致未定义行为。
For example:
例如:
struct MyStruct
struct MyStruct
{
int myInt;
int myInt;
char myChar;
char myChar;
};
int main()
int main()
{
MyStruct* firstPtr = new MyStruct();
MyStruct* firstPtr = new MyStruct();
// .... some code here
// .... 此处有些代码
MyStruct* secondPtr = firstPtr;
MyStruct* secondPtr = firstPtr;
secondPtr->myInt = 5;
secondPtr->myInt = 5;
secondPtr->myChar = 'A';
secondPtr->myChar = 'A';
delete secondPtr;
delete secondPtr;
// ... some code here
// ... 此处是一些代码
std::cout<
std::cout<myInt<<" "< myChar<<"\n";
}
In the above example, the secondPtr which points to the same address the firstPtr is pointing to gets deleted and hence later when firstPtr is dereferenced, it gives undefined behaviour. Here the firstPtr becomes a dangling pointer as it is still pointing to the memory that got deleted.
在上述示例中,指向与firstPtr相同地址的secondPtr被删除,因此之后对firstPtr进行解引用时,会产生未定义行为。这里firstPtr变成了悬空指针,因为它仍然指向已被删除的内存。
To avoid having dangling pointers, we can use smart pointers (or) check all the pointers that are being referenced and explicitly make them NULL so that they don't point to the deleted memory.
为了避免悬空指针,我们可以使用智能指针(或者)检查所有被引用的指针并显式将它们设置为NULL,这样它们就不会指向已删除的内存。
719. What is volatile in C?
在C语言中,volatile是什么?
- 知识点: 其他/未分类 (标签: interviewbit, pwc, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 普华永道
- id: 69b37c2258d557c902bb7b2c | 官方: 否 | 付费: 否
答案:
Volatile is a keyword in C that tells the compiler not to optimize anything that is related to the volatile variable and always fetch the value of the variable from the memory for every use of the volatile variable.
Volatile是C语言中的一个关键字,它告诉编译器不要优化与volatile变量相关的任何内容,并且每次使用volatile变量时都从内存中获取其值。
For example,
例如,
int run = 1;
int run = 1;
while(run)
while(run)
{
// Do something and don't involve run variable at all
// 执行某些操作,完全不涉及run变量
}
In this case, the compiler sees that the variable run is not being used at all in the loop and hence can optimize the while loop into while(1). But run can be changed by a signal handler or OS etc. If we make the variable run as volatile, then the compiler doesn't do any such optimization.
在这种情况下,编译器看到循环中完全没有使用run变量,因此可以将这个while循环优化为while(1)。但是run可能被信号处理器或操作系统等修改。如果我们将run变量声明为volatile,那么编译器就不会进行任何此类优化。
The 3 major places where volatile is used (i.e., variable can change without action from visible code) is: - Interface with hardware that changes the value itself (I/O mapped memory location).
使用volatile的三个主要场景(即变量可能在可见代码之外发生变化)是: - 与硬件接口,硬件自身会改变该值(I/O映射的内存位置)。
- Another thread running that also uses the same variable.
- A signal handler that might change the value.
720. Why are you looking for a job change?
你为什么寻求跳槽?
- 知识点: 其他/未分类 (标签: interviewbit, pwc, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 普华永道
- id: 69b37c2458d557c902bb7bb8 | 官方: 否 | 付费: 否
答案:
This question needs to be answered very carefully. We should never say anything bad about the current company, manager and peers. Always drive the conversation to your career goals and how the role that you are applying for in PwC can help achieve it. In short, frame your move as a path to advancing your career without disparaging your current job. If you have heard positive reviews about PwC, then mention them as well.
这个问题需要非常谨慎地回答。我们绝不应说当前公司、经理或同事的任何坏话。始终将对话引向你的职业目标,以及你在普华永道申请的职位如何能帮助实现这些目标。简而言之,将你的变动表述为推进职业生涯的路径,而不贬低当前工作。如果你听说过普华永道的正面评价,也可以提及。
721. How long is the Interview Process at PwC for Software Engineers?
普华永道软件工程师的面试流程需要多长时间?
- 知识点: 其他/未分类 (标签: interviewbit, pwc, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 普华永道
- id: 69b37c2458d557c902bb7bbd | 官方: 否 | 付费: 否
答案:
There is no standard timeline on how long the Interview Process at PwC is going to take. It all depends on the position, location, urgency etc. PwC usually doesn't prefer keeping the employees on the bench i.e., they usually don't hire excess candidates and keep them on the bench. So even if you successfully passed all interviews, it may take more than 10 days sometimes to get the final offer letter. Generally speaking, the Interview Process usually takes 1 week to 1 month.
普华永道的面试流程没有标准时间表。这完全取决于职位、地点、紧急程度等因素。普华永道通常不喜欢让员工闲置,即他们一般不会招聘多余候选人并让其待命。所以即使你成功通过所有面试,有时可能需要超过10天才能收到最终的录用通知书。一般来说,面试流程通常需要1周到1个月。
722. What is PwC Eligibility Criteria?
普华永道的资格标准是什么?
- 知识点: 其他/未分类 (标签: interviewbit, pwc, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 普华永道
- id: 69b37c2458d557c902bb7bc0 | 官方: 否 | 付费: 否
答案:
- Should not have any active backlogs or arrears.
- Should have 60+ % or 6+ GCPA throughout the education career. (subject to company policy and it may change).
723. Is it hard to get into PwC?
进入普华永道难吗?
- 知识点: 其他/未分类 (标签: interviewbit, pwc, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 普华永道
- id: 69b37c2458d557c902bb7bc4 | 官方: 否 | 付费: 否
答案:
Nothing is hard if we have the right preparation and determination. These interviews majorly focus on resumes, coding problems (DSA & Algorithms), OOPs and fundamentals of computer science. Acquire good knowledge on these topics to fulfil the PwC career goal with flying colours.
只要我们有正确的准备和决心,没有什么事是难的。这些面试主要关注简历、编程问题(数据结构和算法)、面向对象编程和计算机科学基础知识。在这些主题上获得良好知识,以圆满完成普华永道的职业目标。
724. Is there any coding round in PwC?
普华永道有编程轮次吗?
- 知识点: 其他/未分类 (标签: interviewbit, pwc, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 普华永道
- id: 69b37c2458d557c902bb7bc7 | 官方: 否 | 付费: 否
答案:
There is no online coding round currently for PwC. But coding questions will be asked in the interview process.
普华永道目前没有在线编程轮次。但在面试过程中会问编程问题。
725. What is the salary for freshers in PwC Pvt Ltd?
普华永道私营有限公司应届生的薪资是多少?
- 知识点: 其他/未分类 (标签: interviewbit, pwc, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 普华永道
- id: 69b37c2458d557c902bb7bca | 官方: 否 | 付费: 否
答案:
PwC Pvt Ltd currently pays freshers a joining salary of Rs. 6.5 lakh per year on average. Usually, PwC software engineer salary is in the range of Rs. 6 lakh per year to Rs. 8.5 lakh per year for freshers.
普华永道私营有限公司目前对应届生平均支付年薪65万卢比的入职薪资。通常,普华永道软件工程师的薪资范围在每年60万卢比到85万卢比之间,适用于应届生。
726. Why do you want to work at PwC Pvt Ltd?
你为什么想加入普华永道私营有限公司?
- 知识点: 其他/未分类 (标签: interviewbit, pwc, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 普华永道
- id: 69b37c2458d557c902bb7bcd | 官方: 否 | 付费: 否
答案:
Always talk about the values the company values and show that you also abide by those values. Talk about the recent news about the company/ products that you like about this company and show your desire to grow and learn while working for this company. Honestly talk about what you like about the company (not the compensation 😉) and why you want to work for this company.
始终谈论公司重视的价值观,并展示你也遵守这些价值观。谈论你喜欢的公司近期消息/产品,并展示你在这家公司工作期间成长和学习的愿望。诚实谈论你喜欢这家公司的方面(不是薪酬😉),以及为什么你想为这家公司工作。
727. What is a MAC address?
什么是MAC地址?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb8138 | 官方: 否 | 付费: 否
答案:
The distinct 48-bit hardware address of a LAN card is known as a MAC (Media Access Control) address, and it is typically stored in the ROM of the network adapter card. A network card's or device's MAC address is a special identification number that manufacturers provide to certain items. It is often referred to as a physical address encoded in hexadecimal numbers. Every MAC address is distinct globally and is, in principle, set for every device.
局域网网卡的独特48位硬件地址被称为MAC(媒体访问控制)地址,通常存储在网卡的只读存储器中。网卡或设备的MAC地址是制造商为特定产品提供的特殊识别编号。它通常被称为以十六进制数字编码的物理地址。每个MAC地址在全球范围内都是唯一的,原则上为每个设备设置。
There are six pairs of numbers in each MAC address. The first three pairs aid in identifying the manufacturer, and the following three pair names with particular models. In order to connect to networks, a computer may have a variety of devices. As a result, it is typical for a computer to have a MAC address for Ethernet, a Wi-Fi address, and a Bluetooth address.
每个MAC地址中有六对数字。前三对用于识别制造商,后三对则命名特定型号。为了连接网络,一台计算机可能拥有多种设备。因此,一台计算机通常有以太网MAC地址、Wi-Fi地址和蓝牙地址。
728. Return an array of all the distinct quadruplets [nums[a], nums[b], nums[c], nums[d]] from an array nums of n integers in the following way: A, B, C, and D are distinct if 0 = a, b, c, and d. target = nums[a] + nums[b] + nums[c] + nums[d].
返回一个数组,其中包含来自包含 n 个整数的数组 nums 的所有不同四元组 [nums[a], nums[b], nums[c], nums[d]],方式如下:如果 0 = a、b、c 和 d,则 A、B、C 和 D 是不同的。target = nums[a] + nums[b] + nums[c] + nums[d]。
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb8147 | 官方: 否 | 付费: 否
答案:
You can give the response in any sequence.
你可以按任意顺序给出回复。
Example 1: - Input: nums = [1,0,-1,0,-2,2], target = 0
示例1:- 输入:nums = [1,0,-1,0,-2,2],target = 0
Output: [[-2,-1,1,2],[-2,0,0,2],[-1,0,0,1]]
Example 2: - Input: nums = [2,2,2,2,2], target = 8示例2:- 输入:nums = [2,2,2,2,2],target = 8
Output: [[2,2,2,2]]
We'll sort the array first. Take the I j, left, and right pointers. two outer loops for i and j. We keep the final total value in the sum variable.我们先对数组进行排序。取i、j、left和right指针。i和j使用两个外层循环。我们将最终总和值保存在sum变量中。
Then, if the left+right values are equal, we attempt to compute them and add all four values to the set. Because the array is sorted, if the value is less than the total, we will increase the left and decrease the right. O(n3 logn) is the time complexity.
然后,如果left+right的值相等,我们尝试计算它们并将所有四个值添加到集合中。因为数组是排序的,如果值小于总和,我们会增加left并减少right。时间复杂度为O(n3 logn)。
class Solution {
class Solution {
public:
public:
vector<vector> fourSum(vector & nums, int target) {
vector<vector> fourSum(vector & nums, int target) {
set<vector>ans;
set<vector>ans;
sort(nums.begin(), nums.end());
sort(nums.begin(), nums.end());
int n = nums.size();
int n = nums.size();
int i=0, j=0, l, r;
int i=0, j=0, l, r;
while(i<n){
while(i<n){
j=i+1;
j=i+1;
while(j<n){
while(j<n){
int sum=target-nums[i]-nums[j];
int sum=target-nums[i]-nums[j];
l=j+1; r=n-1;
l=j+1; r=n-1;
while(l<r){
while(l<r){
int x = nums[l]+nums[r];
int x = nums[l]+nums[r];
int y = nums[l], z= nums[r] ;
int y = nums[l], z= nums[r] ;
if(x>sum)
if(x>sum)
r--;
r--;
else if(x<sum)
else if(x<sum)
l++;
l++;
else{
否则{
ans.insert({nums[i],nums[j],nums[l],nums[r]});
ans.insert({nums[i],nums[j],nums[l],nums[r]});
while(l<r && nums[r]==z)r--;
当(l<r 且 nums[r]==z) 时 r--;
while(l<r && nums[l]==y)l++;
当(l<r 且 nums[l]==y) 时 l++;
}
}j++;
}j++;
}i++;
}i++;
}
vector<vector>res(ans.begin(),ans.end());
vector<vector>res(ans.begin(),ans.end());
return res;
返回 res;
}
};
729. Return all potential subsets for an integer array with nums unique items (the power set). There cannot be any duplicate subsets in the solution set. You can return the answers in any order.
对于一个包含不重复元素的整数数组,返回其所有可能的子集(幂集)。解集中不能包含重复子集。你可以按任意顺序返回答案。
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb814a | 官方: 否 | 付费: 否
答案:
Example 1:
示例1:
Input: nums = [1,2,3] Output: [[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]]
输入:nums = [1,2,3] 输出:[[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]]
Example 2:
示例2:
Input: nums = [0] Output: [[],[0]]
输入:nums = [0] 输出:[[],[0]]
There are two options for each element in an array if there are n elements total. Either include or exclude the member from the subgroup. Form a recursive answer to the issue using the aforementioned concept.
如果一个数组总共有n个元素,那么每个元素都有两种选择:要么包含该成员,要么排除该成员于子集之外。基于上述概念,为这个问题构建递归解法。
class Solution {
class Solution {
public:
public:
vector<vector> ans;
vector<vector> ans;
void helper(vector
void helper(vector&nums, vector &temp, int i, int n){
if(i==n){
if(i==n){
ans.push_back(temp);
ans.push_back(temp);
return;
return;
}
temp.push_back(nums[i]);
temp.push_back(nums[i]);
helper(nums, temp, i+1, n);
helper(nums, temp, i+1, n);
temp.pop_back();
temp.pop_back();
helper(nums, temp, i+1, n);
helper(nums, temp, i+1, n);
}
vector<vector
vector<vector> subsets(vector & nums) {
int n=nums.size();
int n=nums.size();
vectortemp;
vectortemp;
helper(nums,temp,0,n );
helper(nums,temp,0,n );
return ans;
return ans;
}
};
730. Explain LAN (Local Area Network)
解释LAN(局域网)
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb8155 | 官方: 否 | 付费: 否
答案:
LANs are frequently used to link computers, laptops, and other consumer gadgets, allowing them to share resources (such printers and fax machines) and communicate. Enterprise networks are LANs that are used by businesses or organisations. There are two types of LAN networks: wired LAN and wireless LAN, which operate without the use of cables (achieved using LAN cable). These days, wireless LANs are widely used in locations where laying cable is challenging.
局域网常用于连接计算机、笔记本电脑和其他消费类设备,使它们能够共享资源(如打印机和传真机)并进行通信。企业网络是供企业或组织使用的局域网。局域网有两种类型:有线局域网和无线局域网,无线局域网无需使用电缆即可运行(通过局域网电缆实现)。如今,无线局域网在铺设电缆困难的地方被广泛使用。
Successful Tech Career for FREE!
免费开启成功的科技职业生涯!
Successful Tech Career!
成功的技术职业生涯!
Interview Process
面试流程
CTC & Designation
CTC与职位级别
Projects on the Job
工作项目
Referral System
推荐系统
Try It Out
试试看
2 Lakh+ Roadmaps Created
已生成20万+职业规划
731. What is a ‘frame relay’ and in which layer does it operate?
什么是“帧中继”以及它在哪一层运行?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb8158 | 官方: 否 | 付费: 否
答案:
Frame Relay is a wide-area network (WAN) data transmission protocol that connects local area networks (LANs) and uses the data connection layer of digital packet switching (WANs). X.25 and Frame Relay both use part of the same fundamental technologies. It was created to transfer analogue data as voice conversations and is based on the earlier X.25 packet-switching technology. Frame Relay is a rapid packet technology, in contrast to X.25, which was created for analogue communications, hence the protocol does not make an effort to repair faults. It is frequently used to connect LANs to primary backbones, as well as in leased T-1 lines, public wide area networks, and private network settings. It is not suited for audio or video, which need a continuous stream of transmissions and require a dedicated connection during the transmission period.
帧中继是一种广域网(WAN)数据传输协议,用于连接局域网(LAN),并采用数字分组交换(WAN)的数据连接层。X.25和帧中继都使用了部分相同的基础技术。它最初是为了将模拟数据作为语音对话进行传输而创建的,基于早期的X.25分组交换技术。与为模拟通信而创建的X.25相比,帧中继是一种快速分组技术,因此该协议不会尝试修复错误。它常用于将局域网连接到主骨干网,也用于租用T-1线路、公共广域网和专用网络环境。它不适合需要连续传输流并在传输期间需要专用连接的音频或视频。
732. How does a firewall work?
防火墙是如何工作的?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb815e | 官方: 否 | 付费: 否
答案:
This is one of the often asked topics in networking interviews. Information packets attempting to leave or enter the computer system are detected by the firewall by "listening" for them. It is possible to block traffic depending on a number of factors, including the IP address for which it is intended, the kind of port used to deliver it, or the application from which it originated. The setting of firewalls, or choosing which connections are banned and which are not, is one of the most challenging parts of using them.
这是网络面试中经常被问到的话题之一。防火墙通过“监听”试图离开或进入计算机系统的信息包来检测它们。可以根据多种因素阻止流量,包括目标IP地址、用于传递数据的端口类型或流量来源的应用程序。防火墙的设置,即选择哪些连接被禁止、哪些不被禁止,是使用防火墙最具有挑战性的部分之一。
733. What is IPC communications?
什么是IPC通信?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb8164 | 官方: 否 | 付费: 否
答案:
An independent process is not affected by the execution of other processes while a cooperating process can be affected by other executing processes. In other words, one might think that independent processes will run fast, conveniently, and modularly, but in reality, cooperative behaviour can be used to increase computational speed, convenience, and modularity. Inter-process communication (IPC), or inter-process communication, is a mechanism that enables processes to contact each other and synchronize their actions. Cooperation between these processes is accomplished through this communication.
独立进程不受其他进程执行的影响,而协作进程可能受其他执行进程的影响。换句话说,人们可能认为独立进程会运行得快速、方便且模块化,但实际上,协作行为可以用来提高计算速度、便利性和模块化程度。进程间通信(IPC)是一种使进程能够相互联系并同步其动作的机制。这些进程之间的协作通过这种通信来实现。
734. Given an integer array nums, return all triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i]+nums[j]+nums[k] == 0. Note that the solution set must not contain duplicate triplets.
给定一个整数数组nums,返回所有三元组[nums[i], nums[j], nums[k]],使得i != j、i != k和j != k,且nums[i]+nums[j]+nums[k] == 0。请注意,解决方案集不得包含重复的三元组。
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb816a | 官方: 否 | 付费: 否
答案:
Example 1: - Input: nums = [-1,0,1,2,-1,-4]
示例1:- 输入:nums = [-1,0,1,2,-1,-4]
- Output: [[-1,-1,2],[-1,0,1]]
Explanation: nums[0] + nums[1] + nums[1] = (-1) + 0 + 1 = 0.nums[1] + nums[2] + nums[4] = 0 + 1 + (-1) = 0.nums[0] + nums[3] + nums[4] = (-1) + 2 + (-1) = 0.
The distinct triplets are [-1,0,1] and [-1,-1,2].不同的三元组是[-1,0,1]和[-1,-1,2]。
Notice that the order of the output and the order of the triplets does not matter.
请注意,输出的顺序和三元组的顺序无关紧要。
Example 2: - Input: nums = [0,1,1]
示例2:- 输入:nums = [0,1,1]
- Output: []
Explanation: The only possible triplet does not sum up to 0.
Example 3: - Input: nums = [0,0,0]示例3:- 输入:nums = [0,0,0]
- Output: [[0,0,0]]
Explanation: The only possible triplet sums up to 0.
Solution解决方案
We can modify the array to improve its order. For example, if we change i to (2, 3), we can check if the array is sorted using two indices (low and high). We must ensure that duplicate values are not permitted, so we must have one check for duplicates if i is (2, 3).
我们可以修改数组以改善其顺序。例如,如果我们把i改为(2, 3),我们可以使用两个索引(low和high)来检查数组是否已排序。我们必须确保不允许重复值,所以如果i是(2, 3),我们必须有一个针对重复的检查。
class Solution {
class Solution {
public List<List> threeSum(int[] arr) {
public List<List> threeSum(int[] arr) {
Arrays.sort(arr);
Arrays.sort(arr);
List<List
List<List> ls = new ArrayList<>();
for (int i = 0; i<arr.length-2; i++) {
for (int i = 0; i<arr.length-2; i++) {
if (i == 0 || (i>0 && arr[i-1]!=arr[i])) { //check for duplicates to avoid copy we've used arr[i-1]!=arr[i] instead of arr[i+1]!=arr[i] because we must take the duplicate value in condition i.e. in example 1 [-1,-1,2] is also and output so if we do arr[i+1]!=arr[i] then we'll skip to the next -1 and this output will not come
if (i == 0 || (i>0 && arr[i-1]!=arr[i])) { //检查重复项以避免复制,我们使用了arr[i-1]!=arr[i]而不是arr[i+1]!=arr[i],因为我们必须考虑重复值,即在示例1中[-1,-1,2]也是一个输出,所以如果我们使用arr[i+1]!=arr[i],那么我们会跳过下一个-1,这个输出就不会出现。
int start = i+1;
int start = i+1;
int end = arr.length-1;
int end = arr.length-1;
int sum = 0-arr[i];
int sum = 0-arr[i];
while (start<end) {
while (start<end) {
if (arr[start] + arr[end] == sum) {
if (arr[start] + arr[end] == sum) {
ls.add(Arrays.asList(arr[i], arr[start], arr[end]));
ls.add(Arrays.asList(arr[i], arr[start], arr[end]));
while (start<end && arr[start] == arr[start+1]) start++;//avoid all the same values
while (start<end && arr[start] == arr[start+1]) start++;//避免所有相同的值
while (start<end && arr[end] == arr[end-1]) end--;//avoid all the same values
while (start<end && arr[end] == arr[end-1]) end--;//避免所有相同的值
start++;
start++;
end--;
end--;
} else if (arr[start] + arr[end] < sum) {
} else if (arr[start] + arr[end] < sum) {
start++;
start++;
} else end--;
} else end--;
}
}
}
return ls;
return ls;
}
}
735. Multiply, divide, and modulate two integers to obtain an integer. The fractional parts of an integer are truncated away to obtain an integer.
将两个整数相乘、相除和取模,得到整数。整数的分数部分被截断以得到整数。
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb816d | 官方: 否 | 付费: 否
答案:
When a dividend is divided by the divisor, the quotient is obtained. 8.345 is divided by 8, and -2.7335 is modulated by -2.7.
当被除数除以除数时,得到商。8.345除以8,-2.7335对-2.7取模。
Example 1: - Input: dividend = 10, divisor = 3
示例 1: - 输入:dividend = 10, divisor = 3
- Output: 3
Explanation: 10/3 = 3.33333.. which is truncated to 3.
Example 2: - Input: dividend = 7, divisor = -3示例 2: - 输入:dividend = 7, divisor = -3
- Output: -2
Explanation: 7/-3 = -2.33333.. which is truncated to -2.
Solution:解决方案:
In order to subtract the divisor from the dividend, we must double the divisor, double the number of divisions, check again, and increment or decrement the count by one. We must then subtract the variable from the dividend to get the original dividend.
为了从被除数中减去除数,我们必须将除数加倍,将除法次数加倍,再次检查,并将计数增加或减少一。然后我们必须从被除数中减去该变量,以得到原始的被除数。
class solution {
class solution {
public int divide(int dividend, int divisor) {
public int divide(int dividend, int divisor) {
if(dividend==1<<31 && divisor==-1)
if(dividend==1<<31 && divisor==-1)
return Integer.MAX_VALUE;
return Integer.MAX_VALUE;
boolean sign=(dividend>=0 ==(divisor>=0))? true : false;
boolean sign=(dividend>=0 ==(divisor>=0))? true : false;
dividend=Math.abs(dividend);
dividend=Math.abs(dividend);
divisor=Math.abs(divisor);
divisor=Math.abs(divisor);
int result=0;
int result=0;
while((dividend-divisor)>=0){
while((dividend-divisor)>=0){
int count=0;
int count=0;
while (dividend-(divisor<<1<<count)>=0){
while (dividend-(divisor<<1<<count)>=0){
count++;
count++;
}
result+=1<<count;
result+=1<<count;
dividend-=divisor<<count;
dividend-=divisor<<count;
}
return sign? result:(-result);
return sign? result:(-result);
}
}
736. What is Race conditions
什么是竞态条件
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb8170 | 官方: 否 | 付费: 否
答案:
A multithreaded environment is characterized by multiple threads coexisting on the same resource or executing the same code block. A race condition occurs when threads execute code in parallel and share the same resource or outcome. In the wrong hands, this situation can cause havoc, as the output will be dependent on which threads were executed in sequence.
多线程环境的特点是多个线程在同一资源上共存或执行同一代码块。当线程并行执行代码并共享同一资源或结果时,就会发生竞态条件。如果处理不当,这种情况会造成混乱,因为输出将取决于哪些线程按顺序执行。
Void bankAccount(double money)
void bankAccount(double money)
{
shared= shared + money
shared= shared + money
}
In this case, we utilised two variables. Assume shared is a variable that is shared. Let's assume that the bankAccount function is now invoked for use. The following order will be used to execute the statements of this function;
在这种情况下,我们使用了两个变量。假设 shared 是一个共享变量。让我们假设 bankAccount 函数现在被调用了。该函数的语句将按以下顺序执行;
The shared variable's previous value will be loaded into one of the CPU's registers. The money variable's value will be put into a different register. Two registers will be used to hold the values of two variables, and the outcome will be computed. Put the outcome in the variable share now. For instance, if there are two processes, P1 and P2, both processes are open to calling the function bankAccount at the same time.
shared 变量的先前值将被加载到 CPU 的一个寄存器中。money 变量的值将被放入另一个寄存器中。两个寄存器将用于存放两个变量的值,然后计算结果。现在将结果放入变量 share 中。例如,如果有两个进程 P1 和 P2,两个进程都可以同时调用 bankAccount 函数。
737. What is Semaphore?
什么是信号量?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb8174 | 官方: 否 | 付费: 否
答案:
Semaphore was first proposed by Dijkstra in 1965, and it is a very important technique that uses a simple integer value to manage concurrent processes. A semaphore is a simple integer variable that's shared between threads. The process synchronization problem is solved by using semaphores, and process synchronization is achieved in the multiprocessing environment.
信号量由 Dijkstra 在 1965 年首次提出,是一种非常重要的技术,它使用一个简单的整数值来管理并发进程。信号量是一个在线程之间共享的简单整数变量。进程同步问题通过使用信号量来解决,并且在多处理环境中实现了进程同步。
If, for instance, there are four processes (P1, P2, P3, and P4), all of which call the wait operation on S (initialized with 4). When one of the four processes runs the signal function and the value of the semaphore turns positive, another process P5 should wait before requesting the resource.
例如,如果有四个进程(P1、P2、P3 和 P4),它们都对 S(初始化为 4)调用等待操作。当四个进程之一运行信号函数并且信号量的值变为正数时,另一个进程 P5 应该在请求资源之前等待。
738. To compute the product of two non-negative integers num1 and num2, string each of them.
要计算两个非负整数 num1 和 num2 的乘积,将每个数都表示为字符串。
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb8177 | 官方: 否 | 付费: 否
答案:
Example 1: - Input: num1 = "2", num2 = "3"
示例 1:- 输入:num1 = "2"、num2 = "3"
Output: "6"
Example 2: - Input: num1 = "123", num2 = "456"示例 2:- 输入:num1 = "123"、num2 = "456"
Output: "56088"
Solution解决方案
Multiply every digit pair by itself and add them. We can draw the process! From the following line, we can determine that it is performed: The sum of the indices at which num1[i]*num2[j] is placed is determined by [i + j + 1], [i + j + 1 + 1]`
将每对数字相乘并相加。我们可以绘制这个过程!从以下行我们可以确定其执行方式:num1[i]*num2[j] 放置位置的索引之和由 [i + j + 1]、[i + j + 1 + 1] 决定。
public String multiply(String num1, String num2) {
public String multiply(String num1, String num2) {
int m = num1.length(), n = num2.length();
int m = num1.length(), n = num2.length();
int[] pos = new int[m + n];
int[] pos = new int[m + n];
for(int i = m - 1; i >= 0; i--) {
for(int i = m - 1; i >= 0; i--) {
for(int j = n - 1; j >= 0; j--) {
for(int j = n - 1; j >= 0; j--) {
int mul = (num1.charAt(i) - '0') * (num2.charAt(j) - '0');
int mul = (num1.charAt(i) - '0') * (num2.charAt(j) - '0');
int p1 = i + j, p2 = i + j + 1;
int p1 = i + j, p2 = i + j + 1;
int sum = mul + pos[p2];
int sum = mul + pos[p2];
pos[p1] += sum / 10;
pos[p1] += sum / 10;
pos[p2] = (sum) % 10;
pos[p2] = (sum) % 10;
}
}
StringBuilder sb = new StringBuilder();
StringBuilder sb = new StringBuilder();
for(int p : pos) if(!(sb.length() == 0 && p == 0)) sb.append(p);
for(int p : pos) if(!(sb.length() == 0 && p == 0)) sb.append(p);
return sb.length() == 0 ? "0" : sb.toString();
return sb.length() == 0 ? "0" : sb.toString();
}
739. What is Deadlock?
什么是死锁?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb8181 | 官方: 否 | 付费: 否
答案:
A deadlock is a circumstance where a group of processes are halted because they are each hanging onto resources while waiting for other processes to obtain them.
死锁是一种情况,其中一组进程因为各自持有资源并等待其他进程获取这些资源而被阻塞。
Think of a situation where there is only one track and two trains are approaching each other on it. Once they are in front of each other, none of the trains can move. When there are several processes waiting for resources owned by other processes, a similar scenario arises in operating systems (s). For instance, in the picture below, Process 1 is holding Resource 1 while Process 2 acquires Resource 2, while Process 2 is keeping Resource 1 as they both wait for Resource 2.
想象一种只有一条轨道且两列火车相向而来的情况。一旦它们面对面,任何一列火车都无法移动。当有多个进程在等待其他进程拥有的资源时,操作系统中也会出现类似的情景。例如,在下图中,进程 1 持有资源 1,而进程 2 获取资源 2,同时进程 2 又持有资源 1,因为两者都在等待资源 2。
740. To reverse only the vowels in a string s, let s be given. Only the vowels 'a', 'e', 'i', 'o', and 'u' are reversed, and they may appear in any order.\
要只反转字符串 s 中的元音字母,设 s 为给定字符串。仅反转元音字母 'a'、'e'、'i'、'o' 和 'u',它们可以以任意顺序出现。
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb8184 | 官方: 否 | 付费: 否
答案:
Example: - Input: s = "hello"
示例: - 输入: s = "hello"
Output: "holle"
Solution:解决方案:
To reverse the entire string, just swapping the first and last characters in each pass would have done the job. For reversing only the vowels, the two pointers (i and j) are used. i points to the vowels to the left, and j to the vowels to the right, then they are swapped. O(1) auxiliary space is taken and O(n) time complexity is achieved by the in-place approach.
要反转整个字符串,只需在每次遍历中交换第一个和最后一个字符即可完成。对于只反转元音字母,使用两个指针(i 和 j)。i 指向左侧的元音字母,j 指向右侧的元音字母,然后交换它们。这种方法占用 O(1) 辅助空间,并通过原地操作实现 O(n) 时间复杂度。
class Solution {
class Solution {
public:
public:
bool checkForVowel(char chr){
bool checkForVowel(char chr){
if(chr=='a' || chr=='e' || chr=='i' || chr=='o' || chr=='u' || chr=='A' || chr=='E' || chr=='I' || chr=='O' || chr=='U' )
if(chr=='a' || chr=='e' || chr=='i' || chr=='o' || chr=='u' || chr=='A' || chr=='E' || chr=='I' || chr=='O' || chr=='U' )
return true;
返回 true;
else
else
return false;
返回 false;
}
string reverseVowels(string s) {
string reverseVowels(string s) {
int n = s.length();
int n = s.length();
int i = 0,j=n-1;
int i = 0,j=n-1;
while(i<j){
while(i<j){
if(checkForVowel(s[i]) && checkForVowel(s[j])){
如果(checkForVowel(s[i]) && checkForVowel(s[j])){
swap(s[i],s[j]);
交换(s[i],s[j]);
i++;
i++;
j--;
j--;
}
else if(checkForVowel(s[i]))
否则如果(checkForVowel(s[i]))
j--;
j--;
else if(checkForVowel(s[j]))
否则如果(checkForVowel(s[j]))
i++;
i++;
else{
否则{
i++;
i++;
j--;
j--;
}
}
return s;
返回 s;
}
};
741. A given number array nums must have unique elements in order to obtain all possible subsets (the power set). The solution set must not have duplicate subsets. Return the solution in any order.
给定一个数字数组 nums,必须包含唯一元素,才能获得所有可能的子集(幂集)。解集不得包含重复的子集。返回的解可按任意顺序排列。
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb818a | 官方: 否 | 付费: 否
答案:
Example 1: - Input: nums = [1,2,3]
示例1:- 输入:nums = [1,2,3]
Output: [[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]]
Example 2: - Input: nums = [0]示例2:- 输入:nums = [0]
Output: [[],[0]]
Solution:解决方案:
A common recursive difficulty is to recognise that at every number, we can recognise that it is a subset, so we apportion it to "curr", then ask the function to do the same for the next number using "i+1" in each subsequent call. This is simply keeping "curr" growing by adding "curr" to "curr" if "curr.size()" is less than "nums.length", then removing the latest item from "curr".
一个常见的递归难点是要认识到,在每个数字上,我们都能认识到它是一个子集,因此我们将它分配到“curr”中,然后在每次后续调用中使用“i+1”要求函数对下一个数字执行相同操作。这仅仅是保持“curr”不断增长,如果“curr.size()”小于“nums.length”,则将“curr”添加到“curr”中,然后从“curr”中移除最新添加的项。
class Solution {
class Solution {
public List<List> subsets(int[] nums) {
public List<List> subsets(int[] nums) {
List<List> result = new ArrayList<>();
List<List> result = new ArrayList<>();
findAll(nums, 0, new ArrayList(), result);
findAll(nums, 0, new ArrayList(), result);
return result;
return result;
}
private void findAll(int[] nums, int index, List
private void findAll(int[] nums, int index, Listcurr, List<List > result){
if(curr.size()<=nums.length){
if(curr.size()<=nums.length){
result.add(new ArrayList(curr));
result.add(new ArrayList(curr));
}
for(int i=index;i<nums.length;i++){
for(int i=index;i<nums.length;i++){
curr.add(nums[i]);
curr.add(nums[i]);
findAll(nums, i+1, curr, result);
findAll(nums, i+1, curr, result);
curr.remove(curr.size()-1);
curr.remove(curr.size()-1);
}
}
}
742. What is Mutex?
什么是互斥锁?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb818d | 官方: 否 | 付费: 否
答案:
A mutex is an object that provides mutual exclusion between threads by using operations such as a lock and unlock. It ensures that only one thread has access to a critical section or data by using operations like a lock and unlock. A thread holding the mutex can use the critical section whilst other threads must wait for the lock to be released. A binary semaphore that synchronizes access to shared resources like memory or I/O is called a mutex. It is a locking mechanism.
互斥锁是一种通过使用如锁定和解锁等操作在线程之间提供互斥的对象。它通过使用如锁定和解锁等操作确保只有一个线程可以访问临界区或数据。持有互斥锁的线程可以使用临界区,而其他线程必须等待锁被释放。一种同步对共享资源(如内存或I/O)访问的二进制信号量称为互斥锁。它是一种锁定机制。
743. What is Priority Inversion?
什么是优先级反转?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb8190 | 官方: 否 | 付费: 否
答案:
When it comes to scheduling concepts in Operating systems, one of the foremost factors is Task Scheduling. There are numerous scheduling alternatives such as First Come First Serve, Round Robin, Priority-based scheduling, etc. Each scheduling approach has its own advantages and disadvantages.
在操作系统的调度概念中,一个最重要的因素是任务调度。有许多调度选择,如先来先服务、轮转调度、基于优先级的调度等。每种调度方法都有其自身的优点和缺点。
You may assume that Priority Inversion is a task-based scheduling problem because it is listed under priority-based scheduling. It is a circumstance that occurs in priority-based scheduling when higher-priority jobs interfere with lower-priority jobs when possible.
你可以假设优先级反转是一个基于任务的调度问题,因为它列在基于优先级的调度之下。这是在基于优先级的调度中出现的一种情况,即当可能时,高优先级任务会干扰低优先级任务。
When a lower priority task (L) is running and a higher priority task (H) also needs to run, a higher priority task (H) may be preempted by a lower priority task (L) in priority-based scheduling.
当低优先级任务(L)正在运行,而高优先级任务(H)也需要运行时,在基于优先级的调度中,高优先级任务(H)可能会被低优先级任务(L)抢占。
Now, assume that both lower and higher-priority tasks need to share a common resource (for example, a file or device) to accomplish their respective tasks. Here, task synchronization and resource sharing are required. Several techniques for handling such scenarios may be used, for example, mutex synchronization.
现在,假设低优先级和高优先级任务都需要共享一个公共资源(例如文件或设备)来完成各自的任务。这里需要任务同步和资源共享。可以使用多种技术来处理此类场景,例如互斥锁同步。
A task acquires mutex before entering the critical section (CS) and releases it after exiting the critical section (CS).
任务在进入临界区(CS)之前获取互斥锁,并在退出临界区(CS)后释放它。
744. What is Mem leaks?
什么是内存泄漏?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb8193 | 官方: 否 | 付费: 否
答案:
When programmers create a memory in the heap and forget to delete it, the consequences are that the computer's performance is reduced because of the reduction in available memory, that is, the amount of memory that is accessible. In the worst case, too much of the available memory might become occupied and the application may fail, or the system might slow down radically. Memory leaks are particularly problematic for programs such as Daemons and Servers, which by definition do not terminate.
当程序员在堆中创建内存但忘记删除它时,后果是计算机性能会因可用内存减少而下降,即可访问的内存量减少。在最坏的情况下,过多的可用内存可能被占用,应用程序可能失败,或者系统可能急剧变慢。内存泄漏对守护进程和服务器等程序来说尤其成问题,因为这些程序按定义不会终止。
745. Create a new integer array nums of 2n items, and groups them into as many as possible pairs (a1, b1), (a2, b2), ..., (an, bn) such that the largest possible sum is achieved. Return the largest possible sum.
创建一个由2n个项组成的新整数数组nums,并将它们分成尽可能多的对 (a1, b1), (a2, b2), ..., (an, bn),使得总和达到最大可能值。返回最大的可能总和。
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb8196 | 官方: 否 | 付费: 否
答案:
- Input: nums = [1, 4, 3, 2]
- Output: 4
Explanation:
说明:
All possible pairings (ignoring the ordering of elements) are:
所有可能的分对方式(忽略元素顺序)是:
- (1, 4), (2, 3) -> min(1, 4) + min(2, 3) = 1 + 2 = 3
- (1, 3), (2, 4) -> min(1, 3) + min(2, 4) = 1 + 2 = 3
- (1, 2), (3, 4) -> min(1, 2) + min(3, 4) = 1 + 3 = 4
So the maximum possible sum is 4.
所以最大可能总和是4。
Solution
解决方案
It is the idea behind this approach that we must find such pairs whose min values add up to produce the greatest possible value. We are actually eliminating a greater value by adding up to get that maximum possible value and we will choose pairs of any particular kind such that their difference is the lowest. Sorting takes place and we form pairs by sorting.
这种方法的核心思想是我们必须找到这样的对,其最小值相加能产生最大的可能值。实际上,我们通过相加来消除一个更大的值以获得最大可能值,我们将选择任意特定种类的对,使其差异最小。进行排序,并通过排序形成对。
class Solution {
class Solution {
public:
public:
int arrayPairSum(vector& nums) {
int arrayPairSum(vector& nums) {
sort(nums.begin(), nums.end());
sort(nums.begin(), nums.end());
int ans=0, n=nums.size();
int ans=0, n=nums.size();
for(int i=0;i<n;i++)
for(int i=0;i<n;i++)
{
if((i%2)==0)
if((i%2)==0)
ans+=nums[i];
ans+=nums[i];
}
return ans;
return ans;
}
};
746. What do you understand by Data Redundancy?
你对数据冗余有什么理解?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2d58d557c902bb8199 | 官方: 否 | 付费: 否
答案:
A database or data storage system can be considered to be two or more places for data redundancy. Data redundancy ensures that an enterprise can continue to operate or supply services in the event of data corruption, loss, or damage.
数据库或数据存储系统可以被认为具有两个或多个位置的数据冗余。数据冗余确保在数据损坏、丢失或损毁的情况下,企业能够继续运营或提供服务。
747. Is the Qualcomm interview difficult?
高通公司的面试难吗?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2e58d557c902bb81d5 | 官方: 否 | 付费: 否
答案:
With such strong competition, it is challenging to pass the Qualcomm interview. Employees who are capable of producing great work are highly valued at Qualcomm. If you want to work for this retailing giant, you must be familiar with its fundamental computer science concepts.
由于竞争如此激烈,通过高通公司的面试具有挑战性。高通公司高度重视能够创造优秀工作的员工。如果你想为这家零售巨头工作,你必须熟悉其基础计算机科学概念。
748. Why you should join Qualcomm?
为什么你应该加入高通公司?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2e58d557c902bb81d8 | 官方: 否 | 付费: 否
答案:
For its employees, Qualcomm offers a lot of advantages as well as social opportunities to connect with one another, develop soft skills, give back to the community, and take care of their families.
对于其员工,高通公司提供许多优势以及社交机会,以便相互联系、培养软技能、回馈社区,并照顾他们的家庭。
749. How hard is it to get a Qualcomm internship?
获得高通公司实习机会有多难?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2e58d557c902bb81db | 官方: 否 | 付费: 否
答案:
Yes, given Qualcomm's corporate position and the industry's high level of competition, getting an internship there is challenging. One of the most difficult roles to land is an internship in software engineering, product development, or marketing.
是的,考虑到高通公司的企业地位和行业的高竞争水平,在那里获得实习机会具有挑战性。最难获得的职位之一是软件工程、产品开发或市场营销方面的实习。
750. How do I join Qualcomm?
我如何加入高通公司?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2e58d557c902bb81de | 官方: 否 | 付费: 否
答案:
There are four primary ways through which you may submit your application for an employment opportunity at a company that is based off campus jobs:
有四种主要方式可以通过校园外工作提交你的就业申请:
Careers Page 2. Job Referrals 3. Hiring Challenges 4. Have a Discussion with a Recruiter
- 职业页面 2. 职位推荐 3. 招聘挑战 4. 与招聘人员讨论
751. Does Qualcomm pay well?
高通薪资高吗?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2e58d557c902bb81e1 | 官方: 否 | 付费: 否
答案:
As per Ambitionbox, the average salary of a Qualcomm engineer in India is Rs 15.7 lakhs for employees with less than 1 year of experience to 5 years. The salary at Qualcomm ranges between Rs 11.5 lakhs to Rs 24 lakhs per year.
根据Ambitionbox的数据,高通在印度的工程师平均薪资为每年157万卢比,适用于工作经验不足1年至5年的员工。高通的年薪范围在115万卢比至240万卢比之间。
752. How long is the Qualcomm Interview process?
高通的面试流程有多长?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2e58d557c902bb81e4 | 官方: 否 | 付费: 否
答案:
There can be multiple interviews during the hiring process. The entire process of confirmation may take up to 2–3 weeks. Experienced professionals are hired on average 3–4 weeks after the interview.
招聘过程中可能有多轮面试。整个确认流程可能需要2至3周。有经验的专业人士通常在面试后3至4周被录用。
753. What is the Eligibility Criteria at Qualcomm?
高通的资格标准是什么?
- 知识点: 其他/未分类 (标签: interviewbit, qualcomm, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 高通
- id: 69b37c2e58d557c902bb81e9 | 官方: 否 | 付费: 否
答案:
- At least one bachelor's degree in engineering, information systems, computer science, or a related field or a proven history of experience in the technical field is required.
- You must be able to program in C, Python, Perl, Shell scripting, and/or makefiles and toolchains.
- You may also possess knowledge of makefiles and toolchains.
Coding Problems
0/2
Easy Problems
简单问题
Strings
字符串
Bit Manipulation
位操作
Reverse the String
反转字符串
Very Easy
非常简单
36.31 Mins
36.31分钟
Solve
解答
Number of 1 Bits
1的位数
Easy
简单
8.47 Mins
8.47分钟
Solve
解答
0/2
Intermediate Problems
中级问题
Linked Lists
链表
Strings
字符串
Add Two Numbers as Lists
两个数字列表相加
Medium
中等
43.7 Mins
43.7 分钟
Solve
解答
Implement StrStr
实现StrStr
Medium
中等
33.14 Mins
33.14分钟
Solve
解答
0/3
Advanced Problems
进阶问题
Stacks And Queues
栈和队列
Backtracking
回溯法
Rain Water Trapped
雨水收集
Hard
困难
59.6 Mins
59.6 分钟
Solve
解答
NQueens
N皇后
Hard
困难
74.40 Mins
74.40 分钟
Solve
解答
Sudoku
数独
Hard
困难
71.1 Mins
71.1 分钟
Solve
解答
754. What are pragma directives?
什么是pragma指令?
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5158d557c902bc75c1 | 官方: 否 | 付费: 否
答案:
This is a special-purpose directive that is used to enable or disable certain functionality. This type of directive is compiler-specific, meaning it differs from one compiler to the next. The following are some of the #pragma directives: - #pragma startup and #pragma exit: These directives help us describe the routines that must run before the program starts (before control transfers to main()) and right before programme exit (just before control returns from main()).
这是一种特殊用途的指令,用于启用或禁用某些功能。这类指令是编译器特定的,即不同编译器之间可能不同。以下是一些#pragma指令:#pragma startup和#pragma exit:这些指令帮助我们描述在程序启动前(控制权转移到main()之前)以及程序退出前(控制权从main()返回之前)必须运行的程序例程。
pragma warn Directive: This directive is used to hide warning messages that appear during the compilation process. When we have a huge programme and want to solve all of the errors before looking at warnings, we may use this to hide all warnings and focus on the faults. By making little syntax adjustments, we may make the warnings visible once more.
pragma GCC poison: The GCC compiler supports this directive, which is used to totally eliminate an identifier from a programme. The #pragma GCC poison directive can be used to prevent an identifier from being used.
pragma GCC dependence: You can use the #pragma GCC dependency to compare the relative dates of two files. A warning is issued if the other file is more recent than the current file. If the current file is derived from the other file and needs to be regenerated, this is handy.
pragma GCC system_header: This pragma does not accept any arguments. The rest of the code in the current file is processed as though it originated from a system header as a result of this.
pragma once: The #pragma once directive has a fairly straightforward concept. Even if the programmer includes it numerous times during a compilation, the header file containing this directive is only included once. There is no mention of this in any ISO C++ standard. The #include guard idiom is comparable to this directive. The use of #pragma only once prevents the programme from being optimised for numerous inclusions.
- Data Science
- All Events
- My Events
755. What is the difference between Manual and Automation Testing.
手动测试和自动化测试有什么区别?
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5158d557c902bc75c4 | 官方: 否 | 付费: 否
答案:
There are some significant distinctions between automated and manual testing. Manual testing involves a human performing tests step by step without the use of test scripts. Test automation frameworks, as well as other tools and technologies, are used to automate the execution of tests in automated testing. Learn More .
自动化测试和手动测试之间存在一些显著差异。手动测试需要人工逐步执行测试,而不使用测试脚本。自动化测试则使用测试自动化框架以及其他工具和技术来自动执行测试。了解更多。
| Manual Testing 手动测试 | Automation Testing 自动化测试 |
|---|---|
| Manual testing takes time and requires human resources. 手动测试耗时且需要人力资源。 | Because automated testing is carried out by software tools, it is much faster than manual testing. 由于自动化测试由软件工具执行,因此比手动测试快得多。 |
| Manual testing is only feasible when the test cases are executed only once or twice, with no need for frequent repetition. 手动测试仅在测试用例只执行一次或两次且无需频繁重复时可行。 | When test cases are run frequently over a lengthy period of time, automated testing is a viable alternative. 当测试用例在较长时间内频繁运行时,自动化测试是一个可行的选择。 |
| Manual testing allows for human observation, which may be more beneficial if the goal is enhanced user-friendliness or customer satisfaction. 手动测试允许人工观察,如果目标是增强用户友好性或客户满意度,这可能更有益。 | Automated testing excludes human observation and cannot ensure user-friendliness or a favourable consumer experience. 自动化测试排除了人工观察,无法确保用户友好性或良好的消费者体验。 |
756. Describe how you would reverse a singly linked list.
描述如何反转单链表。
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5158d557c902bc75c7 | 官方: 否 | 付费: 否
答案:
The task is to reverse a linked list given a pointer to the head node. By modifying the linkages between nodes, we can reverse the list.
任务是给定一个指向头节点的指针来反转链表。通过修改节点之间的链接,我们可以反转链表。
Iterative method: - Set up three-pointers. prev is set to NULL, curr is set to head, and next is set to NULL.
迭代方法:- 设置三个指针。prev设为NULL,curr设为head,next设为NULL。
Go through the linked list one by one. Do the following in a loop.
// Before changing next of current,// 在改变当前节点的next之前,
// store next node
// 先存储下一个节点
next = curr->next
next = curr->next
// Now change next of current
// 现在更改当前节点的下一个指针
// This is where actual reversing happens
// 这是实际进行反转的地方
curr->next = prev
curr->next = prev
// Move prev and curr one step forward
// 将 prev 和 curr 向前移动一步
prev = curr
prev = curr
curr = next
curr = next
757. What daemon is responsible for tracking events on your system?
哪个守护进程负责跟踪你系统上的事件?
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5158d557c902bc75ca | 官方: 否 | 付费: 否
答案:
The daemon 'syslogd' is in charge of keeping track of system data and storing it in particular log files.
守护进程“syslogd”负责跟踪系统数据并将其存储在特定的日志文件中。
758. What is marshalling?
什么是编组?
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5158d557c902bc75d8 | 官方: 否 | 付费: 否
答案:
Marshalling is the process of converting an object's memory representation into a format that can be stored or transmitted to other software applications. Marshalling converts an object into serialised form, allowing communication between remote objects.
编组是将对象的内存表示转换为可存储或传输给其他软件应用程序的格式的过程。编组将对象转换为序列化形式,允许远程对象之间进行通信。
Serialization and marshalling are two terms that are often used interchangeably. The objective of marshalling is to have the same object that is present in one operating programme, to be present in another running programme, i.e. object on a client to be transmitted to and present on the server. For example, serialization does not always have this intention because it is simply concerned with translating data into a stream of bytes.
序列化和编组是两个经常互换使用的术语。编组的目标是使一个运行程序中的对象在另一个运行程序中也存在,即客户端上的对象被传输到服务器上并存在。例如,序列化并不总是具有这种意图,因为它只关心将数据转换为字节流。
759. What is a parent/child selector?
什么是父/子选择器?
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5158d557c902bc75de | 官方: 否 | 付费: 否
答案:
All elements that are a direct child of the specified element are selected using the ("parent > child") selection.
使用(“parent > child”)选择会选中指定元素的所有直接子元素。
Parameters: - Parent: This specifies the parent element to be selected.
参数:- 父元素:指定要选择的父元素。
Child: This specifies the direct child element (of the specified parent element) to be selected.
It chooses and returns all of the parent element's direct children.它选择并返回父元素的所有直接子元素。
Here is an example of how to use the jQuery parent > child selector:
以下是如何使用 jQuery 父>子选择器的示例:
Sample Demo
示例演示
First line.
>第一行。
Middle line. (span outside of p element.) > 中间行。(p 元素外的 span。)Last line.
>最后一行。
First line.
>第一行。
Middle line. span inside p element.
>中间行。p元素内的span。
Last line.
>最后一行。
Successful Tech Career for FREE!
免费开启成功的科技职业生涯!
Successful Tech Career!
成功的技术职业生涯!
Interview Process
面试流程
CTC & Designation
CTC与职位级别
Projects on the Job
工作项目
Referral System
推荐系统
Try It Out
试试看
2 Lakh+ Roadmaps Created
已生成20万+职业规划
760. What are the different types of OSI layers?
OSI层有哪些不同类型?
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5158d557c902bc75e9 | 官方: 否 | 付费: 否
答案:
Open Systems Interconnection (OSI) is an acronym for Open Systems Interconnection. It was created in 1984 by ISO or the International Organization for Standardization. It is a seven-layer architecture, with each layer performing distinct functions. These seven layers work together to send data from one person to another across the globe.
开放系统互连(OSI)是Open Systems Interconnection的缩写。它由ISO(国际标准化组织)于1984年创建。它是一个七层架构,每一层执行不同的功能。这七层协同工作,将数据从一个人发送到全球各地的另一个人。
- Physical Layer: The physical layer is the lowest layer in the OSI reference model. It is in charge of establishing a physical connection between the devices. Bits of information are stored in the physical layer. It is in charge of sending individual bits from one node to another. When this layer receives data, it converts the signal received into 0s and 1s and sends them to the Data Link layer, which reassembles the frame.
Data Link Layer: The data link layer is in charge of message transport from node to node. The major purpose of this layer is to ensure that data transfers from one node to another through the physical layer are error-free. There are two sublayers in the Data Link Layer:
Media Access Control (MAC)媒体访问控制(MAC)
Logical Link Control (LLC)
逻辑链路控制(LLC)- Network Layer: The network layer is responsible for data transmission between hosts that are connected to various networks. It also handles packet routing, which is the choosing of the shortest path to send a packet from a large number of options. The network layer places the IP addresses of the sender and receiver in the header.
- Transport Layer: The application layer receives services from the transport layer, while the network layer receives services from the transport layer. Segments are the units of data in the transport layer. It is in charge of the full message's delivery from beginning to end. If an error is detected, the transport layer acknowledges the successful data transmission and re-transmits the data.
- Session Layer: This layer is in charge of establishing connections, maintaining sessions, authenticating users, and ensuring security.
- Presentation Layer: The data from the application layer is retrieved and processed here so that it may be transmitted across the network in the proper format.
- Application Layer: The Application layer, which is implemented by network applications, is at the very top of the OSI Reference Model stack of layers. These programs generate the data that must be sent across the network. This layer also acts as a window for application services to connect to the network and show the information they receive to the user.
761. What is the use of pointers?
指针的用途是什么?
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5158d557c902bc75ef | 官方: 否 | 付费: 否
答案:
Pointers are used to store and maintain the addresses of memory blocks that are dynamically allocated. Data objects or arrays of objects are stored in these blocks. The heap or free store is a memory space in most structured and object-oriented languages from which objects are dynamically allocated.
指针用于存储和维护动态分配的内存块的地址。数据对象或对象数组存储在这些块中。在大多数结构化面向对象的语言中,堆或自由存储区是一种内存空间,用于动态分配对象。
Example in C:
C语言中的示例:
include <stdio.h>
void printpointer()
void printpointer()
{
int var = 10;
int var = 10;
int *pt;
int *pt;
pt = &var;
pt = &var;
printf("The address is: %p \n",pt);
printf("地址是:%p \n",pt);
printf("The value is: %d \n", *pt);
printf("The value is: %d \n", *pt);
}
int main()
int main()
{
printpointer();
printpointer();
}
762. What are the types of kernel objects?
什么是内核对象?
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5158d557c902bc75f2 | 官方: 否 | 付费: 否
答案:
The following are the several types of kernel objects: - Access token objects
以下是几种内核对象类型: - 访问令牌对象
- Event objects
- File objects
- File-mapping objects
- I/O completion port objects
- Job objects
- Mailslot objects
- Mutex objects
- Pipe objects
- Process objects
- Semaphore objects
- Thread objects
- Waitable timer objects
763. What are SDLC phases?
什么是SDLC阶段?
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5158d557c902bc75f5 | 官方: 否 | 付费: 否
答案:
The SDLC (system development life cycle) is a project management model. It specifies the several stages that must be completed in order to take a project from conception to deployment and afterwards maintenance.
SDLC(系统开发生命周期)是一种项目管理模型。它规定了将项目从概念到部署以及之后的维护所必须完成的几个阶段。
The 7 Stages of the System Development Life Cycle:
系统开发生命周期的7个阶段:
- Planning Stage: The planning stage (also known as the feasibility stage) is the time when developers start thinking about the next project. It helps in understanding the definition of the problem and scope of any existing systems, as well as the determination of the new system objectives.
- Feasibility or Requirements of Analysis Stage: Gathering all of the specific details required for a new system, as well as defining the first prototype concepts, is part of the analysis step.
- Design and Prototyping Stage: The design stage is required before moving on to the primary developer stage. Developers will begin by outlining the overall application's characteristics, as well as individual aspects such as User interfaces, System interfaces, Network requirements, Databases.
- Software Development Stage: The development stage is when programmers write code and build the application based on the design papers and specifications that were created earlier.
- Software Testing Stage: Developers will go over their software with a fine-tooth comb during the testing stage, identifying any flaws or defects that need to be recorded, corrected, and retested.
- Implementation and Integration: The general design for the app will come together after testing. Developer efforts will integrate different modules or designs into the source code, usually by using training environments to find more faults or defects.
- Operations and Maintenance Stage: This can include resolving new issues that arise as a result of user reports or dealing with leftover bugs that were not able to be corrected before launch.
764. Explain Bug Life Cycle.
解释Bug生命周期。
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5158d557c902bc75f8 | 官方: 否 | 付费: 否
答案:
The bug life cycle, also known as the defect life cycle, is a process by which a defect progresses through many phases throughout its lifetime. This lifetime begins when a tester reports a bug and ends when a tester determines that the problem has been resolved and will not recur.
Bug生命周期,也称为缺陷生命周期,是一个缺陷在其整个生命周期中经历多个阶段的过程。这个生命周期从测试人员报告一个bug开始,到测试人员确定问题已解决且不会再出现时结束。
In a defect workflow, the following defects states can occur. - New: When a new defect is first documented, it is referred to as "new" and given the status of New.
在缺陷工作流中,可能出现以下缺陷状态。 - 新建:当新缺陷首次被记录时,它被称为“新建”并给予新建状态。
- Assigned: Once the tester has filed the bug, the tester's lead accepts it and assigns it to the programming team.
- Open: The developer begins analyzing and working on the defect.
- Fixed: A developer can mark an issue as "Fixed" once he or she has made a necessary code modification and verified it.
- Pending Retest: Once the defect is fixed, the developer gives the tester a specific code to retest the code. The status given is "pending retest" because the software testing is still waiting from the testers' end.
- Retest: At this level, the tester retests the code to see if the defect has been fixed by the developer and changes the status to "Re-test."
- Reopen: The tester updates the status to "reopened" if the bug continues after the developer has solved it. The bug goes through the life cycle once more.
- Verified: The tester re-tests the bug after the developer has solved it. If no bugs are found in the software, the bug is fixed, and the status is changed to "verified."
- Closed: When a bug is no longer present, the tester marks it as "Closed."
765. What are the advantages and disadvantages of DHCP?
DHCP的优点和缺点是什么?
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5158d557c902bc75fb | 官方: 否 | 付费: 否
答案:
DHCP stands for Dynamic Host Configuration Protocol, and it is a client-server architecture.
DHCP代表动态主机配置协议,它是一种客户端-服务器架构。
The following are the advantages or benefits of DHCP: - DHCP is simple to set up and assign IP addresses to request clients automatically. As a result, the time it takes to manually configure IP addresses can be decreased.
以下是DHCP的优点或好处: - DHCP设置简单,并自动为请求的客户端分配IP地址。因此,手动配置IP地址所需的时间可以减少。
- There are no additional expenditures associated with the deployment.
- Duplicate or erroneous IP address assignment is avoided. As a result, there are no IP address disputes.
- It makes network administration easier.
- It supports a variety of scopes, such as multicast and super scopes.
It benefits mobile users greatly because correct configuration parameters are received immediately from the new network.
The following are DHCP's drawbacks or downsides : - In networks with only one configured DHCP server, the DHCP server might be a single point of failure.以下是DHCP的缺点或不足之处: - 在仅配置了一个DHCP服务器的网络中,DHCP服务器可能成为单点故障。
- Because DHCP packets cannot cross routers, a relay agent is required to ensure that the DHCP server handles all leases on both network segments. Relay agents accept broadcast DHCP packets and forward them to the DHCP server as unicast packets. In this case, the relay agent must be configured with the DHCP server's IP address.
- Security: Because the DHCP server lacks a secure means for client authentication, it can get unauthorised access to IP addresses by submitting credentials such as DHCP client identifiers.
- When a new IP address is assigned, the machine name does not change.
766. What is a web application?
什么是Web应用程序?
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5158d557c902bc75ff | 官方: 否 | 付费: 否
答案:
In contrast to computer-based software applications that run locally on the operating system (OS) of the device, a web application (or web app) is application software that operates on a web server. The user uses a web browser with an active network connection to access web apps. These apps are built on a client-server architecture, in which the user ("client") receives services from an off-site server hosted by a third party. Webmail, online retail purchases, online banking, are all examples of regularly used web applications.
与在设备操作系统(OS)上本地运行的基于计算机的软件应用相比,网络应用(或Web应用)是一种在Web服务器上运行的应用程序软件。用户通过具有活动网络连接的Web浏览器访问网络应用。这些应用基于客户端-服务器架构构建,其中用户(“客户端”)从由第三方托管的远程服务器接收服务。网络邮件、在线零售购物、网上银行都是经常使用的网络应用的例子。
Siemens Interview Preparation
767. How to apply for a job at Siemens?
如何申请西门子的工作?
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5258d557c902bc763a | 官方: 否 | 付费: 否
答案:
- The most convenient method is to use the online mode. You build your profile on the Siemens home page. Of course, you'll be given a unique account that provides you access to all of Siemens' various opportunities around the world.
- They have a referral program where you can be recommended by an internal employee.
- On-campus recruitment is also used by Siemens to hire freshmen. It does, however, only visit a few colleges and universities.
768. How would you describe yourself?
你如何描述自己?
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5258d557c902bc763d | 官方: 否 | 付费: 否
答案:
While the open-ended nature of this question may make it seem more intimidating to respond, it actually works in your favour. Because the question is open-ended, you can go in any direction with your response.
虽然这个问题的开放性可能使其看起来更令人生畏,但实际上这对你有利。因为问题是开放式的,你可以在回答中任意发挥。
Take some time before your interview to consider your primary strengths. What distinguishes you from others in your previous positions? If you've always been good at remaining organized, for example, you could want to include that in your response.
在面试前花些时间考虑你的主要优势。在之前的职位中,什么使你与他人不同?例如,如果你一直擅长保持组织性,你可能会想在回答中包含这一点。
769. How to get an internship at Siemens?
如何在西门子获得实习机会?
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5258d557c902bc7640 | 官方: 否 | 付费: 否
答案:
Students that are interested in applying for an internship at Siemens can do so using the following methods: - Online application: You can first register on the company's website before searching for and applying for open internship positions.
有兴趣申请西门子实习的学生可以通过以下方式进行:- 网上申请:你可以先在公司的网站上注册,然后搜索并申请开放的实习岗位。
- Campus recruitment: Siemens recruits interns at a number of colleges across India. Contact your college's placement coordinator to schedule a campus visit.
- Emailing the HR executive: Locate a former/current Siemens employee/intern and request her email address. Directly address your letter to HR, explicitly expressing your purpose and including a great cover letter and résumé.
- Through a referral: If you know somebody who works at Siemens, ask her for a recommendation. For this, you can also use Facebook or LinkedIn to find some personnel.
770. Why Siemens?
为什么选择西门子?
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5258d557c902bc7643 | 官方: 否 | 付费: 否
答案:
For hiring, they look for people who aren't simply passionate about disruptive ideas but also have the confidence to put them into action.
在招聘时,他们寻找的不仅是热衷于颠覆性想法的人,还要有将这些想法付诸实践的自信。
771. Is Siemens interview hard?
西门子的面试难吗?
- 知识点: 其他/未分类 (标签: interviewbit, siemens, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Siemens
- id: 69b37c5258d557c902bc7646 | 官方: 否 | 付费: 否
答案:
The initial stages of the Siemens interview include the Online Aptitude Test and Online Technical Test. The difficulty level for this is moderate. Candidates who pass the Aptitude and Technical test at the end of the process are invited to an interview.
西门子面试的初始阶段包括在线能力测试和在线技术测试。此难度级别为中等。在流程结束时通过能力测试和技术测试的候选人会被邀请参加面试。
Coding Problems
0/2
Intermediate Problems
中级问题
Time Complexity
时间复杂度
Climbing Stairs
爬楼梯
Medium
中等
38.4 Mins
38.4分钟
Solve
解答
Integers in Strings
字符串中的整数
Medium
中等
23.15 Mins
23.15分钟
Solve
解答
772. What are interrupts?
什么是中断?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc84b9 | 官方: 否 | 付费: 否
答案:
An interrupt is a part of the hardware system that alerts the CPU when it wants to access a specific resource. This interrupt signal is received by an interrupt handler, which “tells” the processor to operate in response to the interrupt request.
中断是硬件系统的一部分,当它想要访问特定资源时,会向CPU发出警报。此中断信号由中断处理程序接收,该处理程序“告知”处理器响应中断请求进行操作。
773. What exactly are macros? What are the benefits and drawbacks?
宏到底是什么?它们有哪些优缺点?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc84c5 | 官方: 否 | 付费: 否
答案:
Macros are pre-processor constants that are replaced at compile time. Thus, a macro is a section of code in a program that has been given a name. The compiler substitutes this name with the actual piece of code whenever it encounters it.
宏是预处理器的常量,在编译时会被替换。因此,宏是程序中已被命名的一段代码。编译器每当遇到这个名称时,就会用实际的代码片段来替换它。
The downside of macros is that they are not function calls; they simply change the code. Similarly, they have the advantage of saving time when substituting the same values.
宏的缺点在于它们不是函数调用;它们只是简单地改变代码。同样,它们也有在替换相同值时节省时间的优点。
include <stdio.h>
// defining macros
// 定义宏
define TEXT "Hello"
define EVEN 2
define SUMMATION (8 + 2)
int main()
int main()
{
printf("String: %s\n", TEXT);
printf("String: %s\n", TEXT);
printf("First Even Number: %d\n", EVEN);
printf("First Even Number: %d\n", EVEN);
printf("Summation: 8+2=%d\n", SUMMATION);
printf("Summation: 8+2=%d\n", SUMMATION);
return 0;
return 0;
}
Any instance of the terms TEXT, EVEN and SUMMATION in the sample above will be substituted by whatever is in their body.
上述示例中任何出现TEXT、EVEN和SUMMATION的地方都将被其主体内容所替换。
774. How will you swap two numbers without the use of a third variable?
不使用第三个变量,你会如何交换两个数字?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc84cb | 官方: 否 | 付费: 否
答案:
This can be achieved using arithmetic operations.
这可以通过算术运算来实现。
int x = 5, y = 15;
int x = 5, y = 15;
// Code to swap the values of x and y
// 用于交换 x 和 y 值的代码
x = x + y; // x now becomes 20
x = x + y; // x现在变为20
y = x - y; // y becomes 5
y = x - y; // y变为5
x = x - y; // x becomes 15
x = x - y; // x变为15
Or
或者
int x = 5, y = 15;
int x = 5, y = 15;
// Code to swap the values of x and y
// 用于交换 x 和 y 值的代码
x = x * y; // x now becomes 75
x = x * y; // x现在变为75
y = x / y; // y becomes 5
y = x / y; // y变为5
x = x / y; // x becomes 15
x = x / y; // x变为15
This can also be achieved using bitwise operations.
这也可以通过位运算来实现。
int x = 5, y = 15;
int x = 5, y = 15;
// Code to swap the values of x and y
// 用于交换 x 和 y 值的代码
x = x ^ y; // x now becomes 20
x = x ^ y; // 此时 x 变为 20
y = x ^ y; // y becomes 5
y = x ^ y; // y 变为 5
x = x ^ y; // x becomes 15
x = x ^ y; // x 变为 15
775. Write the code to reverse a given number using Command Line Arguments.
编写使用命令行参数反转给定数字的代码。
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc84ce | 官方: 否 | 付费: 否
答案:
- There is no need for a specific input line because the number is entered as a Command-line Argument.
- From the command line argument, extract the input number. This number will be of the String type.
- Convert this number to an integer and save it in the variable num.
- Create a variable called rev to record the inverse of this number.
- Now loop through num until it equals zero, i.e. (num > 0).
- At the end of each iteration, add the remainder of num to rev after multiplying it by 10. The last digit of num will be stored in rev.
- To eliminate the last digit from the num, divide it by ten.
- When the loop is finished, rev has the opposite of num.
class IB {
class IB {
// Function for reversing the number
// 用于反转数字的函数
public static int revNum(int num)
public static int revNum(int num)
{
// Variable which stores the
// 存储所需反转数字的
// required reverse number
// 变量
int rev = 0;
int rev = 0;
// Traversing the number digit by digit
// 逐位遍历该数字
while (1) {
while (1) {
if(num <= 0)
if(num <= 0)
break;
break;
// Attach the last digit of num
// 附加 num 的最后一位数字
// as the next digit of rev
// 作为rev的下一位数字
rev = rev * 10 + num % 10;
rev = rev * 10 + num % 10;
// Drop the last digit of num
// 去掉num的最后一位数字
num = num / 10;
num = num / 10;
}
// Return the resultant reverse number
// 返回最终的反转数字
return rev;
return rev;
}
public static void main(String[] args)
public static void main(String[] args)
{
if (args.length > 0) {
if (args.length > 0) {
// Obtain the command line argument and
// 获取命令行参数,并且
// Convert it to integer type from string type
// 将其从字符串类型转换为整数类型
int number = Integer.parseInt(args[0]);
int number = Integer.parseInt(args[0]);
System.out.println(revNum(number));
System.out.println(revNum(number));
}
else
else
System.out.println("No command line arguments found.");
System.out.println("No command line arguments found.");
}
}
776. What is meant by Cycle Stealing?
什么是“周期窃取”?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc84d1 | 官方: 否 | 付费: 否
答案:
In the context of Direct Memory Access, we come across cycle stealing (DMA). The DMA controller can either use the data bus when the CPU is not using it or force the CPU to cease execution temporarily. Cycle stealing is the term for the second method. It's worth noting that cycle stealing is only possible at specific breakpoints in an instruction cycle.
在直接内存访问的上下文中,我们会遇到周期窃取(DMA)。DMA控制器可以在CPU不使用数据总线时使用它,或者强制CPU暂时停止执行。周期窃取是第二种方法的术语。值得注意的是,周期窃取只能在指令周期的特定断点处发生。
777. What do you know about SLIP?
关于SLIP你了解多少?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc84dd | 官方: 否 | 付费: 否
答案:
Serial Line Internet Protocol (SLIP) is a basic protocol for communication over serial ports and routers that works with TCP/IP. They allow machines that were previously configured for direct communication to communicate with one another.
串行线路互联网协议(SLIP)是一种基于TCP/IP工作的基本协议,用于串行端口和路由器之间的通信。它允许之前配置为直接通信的机器能够相互通信。
A client might be linked to the Internet service provider (ISP) over a slower SLIP line, for example. When a client requires a service, he or she submits a request to the ISP. The ISP responds to the request and sends it across high-speed multiplexed lines to the Internet. The results are then sent back to the client through SLIP lines by the ISP.
例如,客户端可能通过较慢的SLIP线路连接到互联网服务提供商(ISP)。当客户端需要服务时,他向ISP提交请求。ISP响应请求并将其通过高速多路复用线路发送到互联网。然后,结果由ISP通过SLIP线路发送回客户端。
The format of a SLIP frame is fairly simple, consisting of a payload and a flag that serves as an end delimiter. The flag is usually a special character with a decimal value of 192. If this flag is included in the data, it is preceded by an escape sequence, which prevents the receiver from mistaking it for the end of the frame.
SLIP帧的格式相当简单,包含一个有效载荷和一个用作结束分隔符的标志。该标志通常是一个十进制值为192的特殊字符。如果此标志包含在数据中,其前面会有一个转义序列,以防止接收器将其误认为是帧的结束。
778. What is IPsec? What are its components?
什么是IPsec?它的组件有哪些?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc84e3 | 官方: 否 | 付费: 否
答案:
IP security (IPSec) is an Internet Engineering Task Force (IETF) standard suite of protocols that offer data authentication, integrity, and confidentiality between two communication points over an IP network. It also specifies how packets are encrypted, decrypted, and authenticated. It specifies the protocols for safe key exchange and key management.
IP安全(IPSec)是互联网工程任务组(IETF)的一套标准协议,用于在IP网络上的两个通信点之间提供数据认证、完整性和机密性。它还规定了数据包如何加密、解密和认证。它规定了安全密钥交换和密钥管理的协议。
It consists of the following components: - Encapsulating Security Payload (ESP): Data integrity, encryption, authentication, and anti-replay are all provided by ESP. It also supports payload authentication.
它包含以下组件:- 封装安全载荷(ESP):ESP提供数据完整性、加密、认证和防重放功能。它还支持载荷认证。
- Authentication Header (AH): This header also supports data integrity, authentication, and anti-replay, but not encryption. anti-replay protection guards against unwanted packet transmission. It does not ensure the privacy of data.
- IKE (Internet Key Exchange): It's a network security protocol that allows two devices to dynamically exchange encryption keys and find a way to communicate across a Security Association (SA). To support secure communication, the Security Association (SA) creates common security properties between two network entities. IKE (Internet Key Exchange) protects the content of messages and serves as an open framework for implementing common algorithms like SHA and MD5. Each packet is assigned a unique identifier by the algorithm's IP sec users. The device can then determine whether a packet is correct or not using this identifier. Unauthorized packets are deleted and not delivered to the intended recipient.
779. What do you understand about a Subnet Mask?
你对子网掩码有什么理解?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc84e6 | 官方: 否 | 付费: 否
答案:
The number indicating the range of IP addresses that can be used within a network is called a Subnet Mask. Sub Networks or subnets are assigned to them. These subnetworks are a collection of LANs that are linked to the internet.
指示网络内可使用的IP地址范围的数字称为子网掩码。子网或子网络被分配给它。这些子网络是连接到互联网的局域网集合。
This Subnet mask is a 32-bit value that masks the IP address and divides it into two parts: the network address and the host address. Subnet Masks are made by assigning all network bits to "1" and all host bits to "0." There are two network addresses that can't be assigned to any host on the network: "0" and "255", which are assigned to the network and the broadcast address, respectively, and hence can't be assigned to anyone.
该子网掩码是一个32位值,用于屏蔽IP地址并将其分为两部分:网络地址和主机地址。子网掩码通过将所有网络位设为“1”和所有主机位设为“0”来生成。有两个网络地址不能分配给网络上的任何主机:“0”和“255”,分别分配给网络地址和广播地址,因此不能分配给任何人。
780. What is NAT?
什么是NAT?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc84e9 | 官方: 否 | 付费: 否
答案:
Network Address Translation (NAT) is an acronym for Network Address Translation. It involves modifying the IP headers of packets being transported over a traffic routing device to remap one IP address space to another.
网络地址转换(NAT)是Network Address Translation的缩写。它涉及修改通过流量路由设备传输的数据包的IP头,以将一个IP地址空间重新映射到另一个。
781. What is piggybacking?
什么是捎带确认?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc84ec | 官方: 否 | 付费: 否
答案:
After receiving data packets in two-way communication, the receiver sends an acknowledgment (control frame or ACK) to the sender. The receiver, on the other hand, does not send the acknowledgment right away, instead of waiting until the next data packet is received by its network layer. The ACK is then added to the incoming data frame. Piggybacking is the process of postponing the ACK and attaching it to the next outgoing data frame.
在双向通信中接收到数据包后,接收方向发送方发送确认(控制帧或ACK)。然而,接收方不会立即发送确认,而是等到其网络层接收到下一个数据包。然后,ACK被添加到传入的数据帧中。推迟ACK并将其附加到下一个传出数据帧的过程称为捎带确认。
782. What is the difference between a clustered index and non clustered index ?
聚集索引和非聚集索引有什么区别?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc84f2 | 官方: 否 | 付费: 否
答案:
A clustered index is a form of index that reorders the physical storage of records in a table, whereas a non clustered index is one in which the logical order of the index does not match the physical storage order of the rows on the disc. Insert and update operations are faster than with a clustered index. Data is physically stored in index order, making it faster to read than non-clustered data.
聚集索引是一种重新排序表中记录物理存储顺序的索引形式,而非聚集索引是指索引的逻辑顺序与行在磁盘上的物理存储顺序不匹配的索引。插入和更新操作比聚集索引更快。数据按索引顺序物理存储,使其读取速度比非聚集数据更快。
783. What do you understand about round trip time?
你对往返时间(RTT)有什么理解?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc84f5 | 官方: 否 | 付费: 否
答案:
The round-trip time (RTT) is the time it takes for a network request to travel from a starting point to a destination and back to the initial point in milliseconds (ms). RTT is a useful indicator for measuring the health of a connection on a local network or the wider Internet, and it is frequently used by network managers to diagnose network connection speed and dependability.
往返时间(RTT)是指网络请求从起点传输到目的地再返回起点所需的时间,以毫秒(ms)计算。RTT 是衡量局域网或更广泛互联网上连接健康状况的有用指标,网络管理人员经常用它来诊断网络连接速度和可靠性。
784. What is a Ping?
什么是Ping?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc84f8 | 官方: 否 | 付费: 否
答案:
A ping is a computer program that is used to determine whether a host is reachable and capable of accepting requests across an IP network. It operates by sending an ICMP (Internet Control Message Protocol) Echo to a network computer and waiting for a response. It can be used for troubleshooting as well.
Ping 是一种计算机程序,用于确定主机是否可达以及是否能够接受通过 IP 网络发送的请求。它通过向网络计算机发送 ICMP(互联网控制消息协议)回显并等待响应来操作,也可用于故障排除。
785. What is Ethernet?
什么是以太网?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc84fb | 官方: 否 | 付费: 否
答案:
Ethernet is a network technology that connects devices via cables for data transmission in Local Area Networks (LANs), Metropolitan Area Networks (MANs), and Wide Area Networks (WANs). It delivers services on the OSI Model's Physical and Data Link layers. The purpose of an Ethernet network is so computers and other devices can efficiently share files, information, and data. Ethernet was first introduced in 1980.
以太网是一种网络技术,通过电缆连接设备,用于局域网(LAN)、城域网(MAN)和广域网(WAN)中的数据传输。它在 OSI 模型的物理层和数据链路层提供服务。以太网网络的目的在于使计算机和其他设备能够高效地共享文件、信息和数据。以太网于1980年首次推出。
786. Give an instance where there was a bug that you didn't find in black box testing but discovered in white box testing.
举一个例子,有一个在黑盒测试中未发现但在白盒测试中发现的错误。
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc8507 | 官方: 否 | 付费: 否
答案:
Let's imagine you have an item that is stored across numerous tables, and you want to delete it. Your black-box test case is considered passed after the entity disappears from the GUI after deletion in black-box testing. White-box testing, on the other hand, verifies that all relevant rows are removed from the tables. The test case is considered unsuccessful if the deletion simply deletes the parent record, leaving the child rows intact.
假设有一个项目存储在多张表中,你想要删除它。在黑盒测试中,删除后该实体从图形界面中消失即视为测试用例通过。然而,白盒测试会验证所有相关行是否从表中移除。如果删除仅删除了父记录,而子行保持不变,则测试用例被视为失败。
787. What is slice splicing in software testing? What are its two types?
什么是软件测试中的切片拼接?它的两种类型是什么?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc850a | 官方: 否 | 付费: 否
答案:
A program slice is a set of program statements. We could code a slice and test it right away if we chose to construct software in terms of compatible slices. We can then code and test additional slices before combining them into good software. Slice splicing is the term for this process.
程序切片是一组程序语句。如果我们选择按兼容切片的方式构建软件,我们可以编写一个切片并立即测试它。然后,我们可以编写和测试其他切片,再将它们组合成良好的软件。这个过程称为切片拼接。
There are two forms of slicing: static and dynamic.
切片有两种形式:静态切片和动态切片。
Static Slicing: - A static slice of a program contains all statements that may change the value of a variable at any point during any arbitrary execution of the program.
静态切片:- 程序的静态切片包含所有在程序的任何任意执行过程中可能改变变量值的语句。
- In general, static slices are larger.
It considers every potential program execution.
Dynamic slicing: - A dynamic slice of a program is made up of all the statements that actually impact the value of a variable at any point for a specific execution of the program.动态切片:- 程序的动态切片由所有在特定执行过程中实际影响变量值的语句组成。
- In general, dynamic slices are smaller.
- Only takes into account a particular program execution.
788. Enlist the differences between AWT and Swing in Java.
列出Java中AWT和Swing之间的区别。
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc850d | 官方: 否 | 付费: 否
答案:
| AWT | Swing |
|---|---|
| Java AWT is a Java API for creating graphical user interfaces. Java AWT 是用于创建图形用户界面的Java API。 | Swing is a part of Java Foundation Classes that are used to build a variety of apps. Swing 是Java基础类(JFC)的一部分,用于构建各种应用程序。 |
| The components that belong to Java AWT are heavily weighted. Java AWT 的组件是重量级的。 | The components that belong to Java Swing are light weighted. Java Swing 的组件是轻量级的。 |
| The execution time of AWT is more than that of Swing. AWT components are comparatively less powerful. AWT 的执行时间比 Swing 长。AWT 组件相对功能较弱。 | The execution time of Swing is less than that of AWT. Swing components are comparatively more powerful. Swing 的执行时间比 AWT 短。Swing 组件相对功能更强。 |
| The components that belong to Java AWT are platform-dependent. Java AWT 的组件是平台相关的。 | The components that belong to Java Swing are independent of any platform. Java Swing 的组件是平台无关的。 |
| AWT does not support the MVC pattern. AWT 不支持 MVC 模式。 | Swing supports the MVC pattern. Swing 支持 MVC 模式。 |
789. Explain memory leak in C++. How can you avoid it?
解释 C++ 中的内存泄漏。如何避免它?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc8510 | 官方: 否 | 付费: 否
答案:
Memory leaking happens in C++ when programmers dynamically allocate memory with the new keyword or using malloc()/calloc() and then forget to deallocate it with the delete() or delete[] operators or the free() function. In C++, one of the most common causes of memory leakage is the use of the incorrect delete operator.
当程序员使用 new 关键字或 malloc()/calloc() 动态分配内存,但忘记使用 delete() 或 delete[] 运算符或 free() 函数释放时,C++ 中就会发生内存泄漏。在 C++ 中,内存泄漏最常见的原因之一是使用了错误的 delete 运算符。
The delete [] operator should be used to free an array of data values, whereas the delete operator should be used to clear a single allocated memory space.
应使用 delete [] 运算符来释放数据值数组,而应使用 delete 运算符来清除单个分配的内存空间。
To avoid memory leak: - When possible, utilise smart pointers instead of manually managing memory.
为避免内存泄漏:- 尽可能使用智能指针,而不是手动管理内存。
- Instead of char *, use std::string. All memory management is handled internally, which is quick and well-optimized.
- Unless you're interacting with an older library, you should never use a raw pointer.
- In C++, the simplest strategy to avoid memory leaks is to have a few new/delete calls as possible at the program level — ideally NONE.
- Write all code between the new and delete keywords to allocate memory and deallocate memory.
790. What is the meaning of a command line argument in C?
C 中命令行参数的含义是什么?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6a58d557c902bc8513 | 官方: 否 | 付费: 否
答案:
Command-line arguments are used to get parameters from the command prompt in C. There are three arguments to the main function in C. They are as follows: - Argument counter
命令行参数用于在 C 中从命令提示符获取参数。C 中 main 函数有三个参数。如下所示:- 参数计数器
- Argument vector
Environment vector
TCS Interview Preparation
791. Does TCS Nqt have coding questions?
TCS Nqt 有编程题吗?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6b58d557c902bc8555 | 官方: 否 | 付费: 否
答案:
Generally, there will be 2 coding questions in the TCS NQT Online test.TCS has renamed these questions "Hands-on Coding," although they are still the same TCS Coding Questions.
通常,TCS NQT 在线测试中会有 2 个编程题。TCS 已将这些题目更名为“动手编程”,但它们仍然是相同的 TCS 编程题。
The languages that you can utilize for TCS NQT are as follows: - C
可用于 TCS NQT 的编程语言如下:- C
- C++
- Python
- JAVA
- Perl
792. Who is eligible for TCS Nqt?
谁有资格参加 TCS Nqt 考试?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6b58d557c902bc8558 | 官方: 否 | 付费: 否
答案:
- Pre-final and final-year undergraduate, graduate, and diploma students.
- Students with any degree or specialization/discipline are welcome to apply.
- Freshers (those who have fewer than two years of experience).
793. What is the salary for freshers in TCS?
TCS 给应届生的薪水是多少?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6b58d557c902bc855b | 官方: 否 | 付费: 否
答案:
TCS pays freshers a minimum salary of Rs.3.30 to Rs.3.60 lakhs per year if they pass all interview rounds, including the NQT, technical round, HR round, and management round. This is TCS Ninja's initial pay.
如果应聘者通过所有面试环节(包括 NQT、技术轮、HR 轮和管理轮),TCS 给应届生提供的最低年薪为 33 万至 36 万卢比。这是 TCS Ninja 的初始薪资。
794. What kind of coding questions are asked in TCS?
TCS 中会问哪些类型的编程题?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6b58d557c902bc855e | 官方: 否 | 付费: 否
答案:
These are the most critical and fundamental TCS NQT coding questions, which serve as a foundation for solving additional problems : - Reverse a string
这些是最关键和最基础的 TCS NQT 编程题,它们是解决额外问题的基础:- 反转字符串
- Reverse a number
- Prime number
- Greatest among 10 numbers
- Fibonacci series
- Swap 2 numbers
- Armstrong number
- Decimal to binary & vice versa
- Average of 2 numbers
- Odd-even number
Check leap year
and other basic coding questions.以及其他的基础编程题。
795. What are the basic questions asked in a TCS interview?
TCS 面试中会问哪些基础问题?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6b58d557c902bc8561 | 官方: 否 | 付费: 否
答案:
You will be tested on your programming skills. Computer Networks, DBMS, Software Management, Operation Systems, and Cloud Computing are all topics that students will be asked questions from. Prepare well about projects which you have created. Prepare the basics of HTML, C, C++, and other computer-related topics. Prepare the topics which are mentioned in your resume. The most common questions asked in HR interviews relate to relocation, background, reasons for a job change, expected salary, and others. They can also ask questions related to the company. Know the company well.
你将接受编程技能的测试。计算机网络、数据库管理系统、软件管理、操作系统和云计算都是学生会被问及的问题主题。好好准备你创建过的项目。准备 HTML、C、C++ 和其他计算机相关主题的基础知识。准备简历中提到的主题。HR 面试中最常见的问题涉及换工作地点、背景、换工作原因、期望薪资等。他们也可能问与公司相关的问题。要深入了解公司。
796. What is TCS ninja?
什么是TCS忍者?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6b58d557c902bc8566 | 官方: 否 | 付费: 否
答案:
TCS Ninja is a job role that TCS offers to new employees (freshers).
TCS忍者(TCS Ninja)是TCS为新员工(应届毕业生)提供的一个职位角色。
The TCS Ninja Recruitment eligibility criteria are shown below. - In the Class Xth, Class XIIth, Diploma (if applicable), Graduation, and Postgraduate examinations, the minimum aggregate (all subjects in all semesters) scores should be 60 percent or 6 CGPA.
TCS忍者招聘资格标准如下所示。- 在十年级、十二年级、文凭(如适用)、本科和研究生考试中,所有科目所有学期的总平均分应至少为60%或6 CGPA。
- Students in the highest qualification must not have more than one ongoing backlog, arrear, or ATKT at the time of the TCS Selection process. Keep in mind that if you're chosen, you shouldn't have any outstanding debts or arrears when you start working at TCS.
- Declaring gaps in education is required (if any). Extended education (examinations completed after the Board / University's deadline) should not result in a break in education. Any gap in education should not last longer than 24 months and should only be taken for legitimate reasons.
- To participate in the TCS Ninja recruitment process, students must be between the ages of 18 and 28.
- UG/PG Engineering Courses & Discipline Only B.E. / B.Tech / M.E. / M.Tech / MCA / M.Sc courses from any university / college specialization are eligible to apply.
- Freshers with up to two years of prior work experience are eligible to apply for the TCS Ninja recruiting process.
797. How many rounds of interviews are there in TCS?
TCS的面试有几轮?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6b58d557c902bc8569 | 官方: 否 | 付费: 否
答案:
There are 3 rounds of interviews: - Technical interview
面试共有3轮:- 技术面试
- Managerial interview
HR interview
Check out the above section to learn more .请查看以上部分以了解更多信息。
798. Is TCS interview tough for experienced?
TCS面试对有经验者难吗?
- 知识点: 其他/未分类 (标签: interviewbit, tcs, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6b58d557c902bc856e | 官方: 否 | 付费: 否
答案:
It makes no difference if the TCS interview is difficult or simple. The truth is that the more you prepare, the easier it will be to pass the interview. Acquire sufficient knowledge about interview stages, rounds, and questions, among other things. The interview is based on the candidate's CV (prior experience, previous works) and the job requirements. Questions are posed about programming languages, logical thinking, and products/software/projects on which the candidate has recently or previously worked.
TCS面试难或简单并无区别。事实是,你准备得越多,通过面试就越容易。充分了解面试阶段、轮次和问题等信息。面试基于候选人的简历(既往经验、先前工作)和职位要求。问题涉及编程语言、逻辑思维,以及候选人最近或以前工作过的产品/软件/项目。
Coding Problems
0/9
Easy Problems
简单问题
Math
数学
Arrays
数组
Bit Manipulation
位操作
Strings
字符串
Verify Prime
验证素数
Easy
简单
14.40 Mins
14.40分钟
Solve
解答
Chips Factory
芯片工厂
Very Easy
非常简单
22.10 Mins
22.10 分钟
Solve
解答
Bit Flipping
位翻转
Very Easy
非常简单
25.33 Mins
25.33 分钟
Solve
解答
Number of Sundays
星期日的数量
Very Easy
非常简单
25.20 Mins
25.20 分钟
Solve
解答
Greater than All
大于所有
Very Easy
非常简单
21.34 Mins
21.34 分钟
Solve
解答
Product of Digits
数字之积
Very Easy
非常简单
11.11 Mins
11.11分钟
Solve
解答
Maximum Substring
最大子串
Very Easy
非常简单
22.28 Mins
22.28分钟
Solve
解答
Round Table
圆桌
Very Easy
非常简单
22.24 Mins
22.24分钟
Solve
解答
Odd Even Rule
奇偶规则
Very Easy
非常简单
12.42 Mins
12.42分钟
Solve
解答
0/1
Intermediate Problems
中级问题
Math
数学
Greatest Common Divisor
最大公约数
Medium
中等
10.57 Mins
10.57分钟
Solve
解答
799. What happens after you enter the URL of a website?
当你输入一个网站的URL后会发生什么?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6d58d557c902bc8616 | 官方: 否 | 付费: 否
答案:
In the above image, you can see the flow mentioned in numbering. This is how the flow goes when you enter the URL of the website. Let’s understand the process -
在上图中,你可以看到按编号标注的流程。这就是当你输入网站 URL 时所经过的流程。让我们来理解这个过程 -
When you enter the URL of a website into your web browser, the following sequence of events occurs:
当你在网页浏览器中输入网站的 URL 时,会发生以下一系列事件:
The web browser sends a request to the domain name system (DNS) server to resolve the domain name to an IP address. The DNS server is a network service that translates domain names into IP addresses, which are used to locate and communicate with servers on the internet. 2. The web browser sends an HTTP request to the web server associated with the IP address of the domain name. The HTTP request includes the URL of the webpage, as well as other information such as the type of request (e.g., GET, POST), the browser being used, and any cookies that may be associated with the request. 3. The web server processes the HTTP request and sends an HTTP response back to the web browser. The HTTP response includes the requested webpage, as well as other information such as the status of the request, the type and size of the content, and any cookies that may be associated with the response. 4. The web browser receives the HTTP response and processes the content of the response, which may include rendering HTML, CSS, and JavaScript code, downloading images and making additional requests for resources such as fonts and scripts. 5. The web browser displays the webpage to the user.
- 网页浏览器向域名系统(DNS)服务器发送请求,以将域名解析为 IP 地址。DNS 服务器是一种网络服务,它将域名转换为 IP 地址,这些 IP 地址用于定位互联网上的服务器并与之通信。
800. What is a software development life cycle and what are the different phases it consists of?
什么是软件开发生命周期,它包含哪些不同阶段?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6d58d557c902bc8619 | 官方: 否 | 付费: 否
答案:
The software development life cycle (SDLC) is the process of developing a software system, from conception to maintenance. It consists of a series of steps or phases that are followed to ensure that the software is developed in a systematic and structured manner.
软件开发生命周期(SDLC)是从概念到维护的软件开发过程。它由一系列步骤或阶段组成,这些步骤或阶段被遵循以确保软件以系统化和结构化的方式开发。
The different phases of the SDLC may vary depending on the specific methodology being used, but most SDLC models include the following phases:
SDLC 的不同阶段可能因所用的具体方法论而异,但大多数 SDLC 模型包含以下阶段:
Planning: In this phase, the goals and objectives of the software are defined, and a high-level plan is developed for how to achieve them. This may include identifying the target audience, determining the scope of the project, and establishing timelines and budgets. 2. Analysis: In this phase, the requirements for the software are gathered and analyzed. This may include conducting user interviews and focus groups, creating user stories and use cases, and defining the functional and non-functional requirements of the system. 3. Design: In this phase, the overall architecture and design of the software are developed. This may include creating a detailed design document, developing wireframes and prototypes, and deciding on the technologies and frameworks to be used. 4. Implementation: In this phase, the code for the software is written and tested. This may include writing and debugging code, integrating different modules and components, and performing unit and integration testing. 5. Testing: In this phase, the software is thoroughly tested to ensure that it meets the requirements and works as expected. This may include creating test plans, executing different types of testing (e.g. unit testing, integration testing, system testing), and identifying and fixing any issues that are discovered. 6. Deployment: In this phase, the software is deployed to a production environment and made available to users. This may include installing and configuring the software, performing final testing, and releasing updates and patches as needed. 7. Maintenance: In this phase, the software is monitored and maintained over time to ensure that it continues to function as expected. This may include fixing bugs, adding new features, and updating the software to meet changing user needs.
- 规划:在此阶段,定义软件的目标和目的,并制定实现这些目标的高层计划。这可能包括确定目标用户、界定项目范围,以及设定时间表和预算。
- Data Science
- All Events
- My Events
801. What is a bug in the software and how do you go about fixing it?
软件中的 bug 是什么,你如何着手修复它?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6d58d557c902bc861c | 官方: 否 | 付费: 否
答案:
A bug is an error, flaw, or failure in the software that causes it to behave in unexpected or unintended ways. Bugs can be caused by a variety of factors, including coding errors, design mistakes, and hardware or software incompatibilities.
Bug 是软件中的一种错误、缺陷或故障,导致其以意外或非预期的方式运行。Bug 可能由多种因素引起,包括编码错误、设计失误,以及硬件或软件不兼容。
To fix a bug, the following steps are typically followed:
要修复 bug,通常遵循以下步骤:
Identify the bug: The first step in fixing a bug is to identify the cause of the issue. This may involve reviewing error messages and logs, analyzing the code, and reproducing the problem. 2. Debug the code: Once the cause of the bug has been identified, the next step is to debug the code to understand how the bug is occurring and how it can be fixed. This may involve using debugging tools and techniques, such as setting breakpoints and stepping through the code line by line. 3. Fix the bug: After the cause of the bug has been identified and understood, the next step is to make changes to the code to fix the issue. This may involve modifying existing code, adding new code, or deleting code that is no longer needed. 4. Test the fix: Once the bug has been fixed, it is important to test the code to ensure that the fix is effective and that the issue has been resolved. This may involve running unit tests or manually testing the software to ensure that it is functioning as expected. It is equally important to ensure that the changes made to fix the bug do not break other parts of the working code. This means that the fix should be thoroughly tested, not just in isolation but in the context of the overall system. By thoroughly testing the fix, developers can be confident that the issue has been resolved and that the code remains stable and functioning correctly. This reduces the risk of introducing new bugs or issues and helps maintain the overall quality of the software. 5. Deploy the fix: After the bug has been fixed and tested, the next step is to deploy the fix to the production environment. This may involve releasing a new version of the software or applying a patch to the existing version.
- 识别 bug:修复 bug 的第一步是识别问题的原因。这可能涉及检查错误消息和日志、分析代码,以及重现该问题。
Fixing a bug can be a time-consuming process, and it is important to follow a systematic and structured approach to ensure that the issue is resolved in a reliable and efficient manner.
修复 bug 可能是一个耗时的过程,重要的是遵循系统化和结构化的方法,以确保问题以可靠和高效的方式解决。
802. What is a software testing technique and how do you go about testing software?
什么是软件测试技术,你如何着手测试软件?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6d58d557c902bc8622 | 官方: 否 | 付费: 否
答案:
Software testing is the process of evaluating a software system or component to determine whether it meets the specified requirements and works as intended. Testing is an important step in the software development process, as it helps to ensure the quality and reliability of the software.
软件测试是评估软件系统或组件以确定其是否符合规定要求并按预期运行的过程。测试是软件开发过程中的重要步骤,因为它有助于确保软件的质量和可靠性。
There are many different software testing techniques, and the choice of technique depends on the specific needs of the project and the type of software being tested. Some common testing techniques include: - Unit testing: Unit testing is a technique that involves testing individual units or components of a software system. It is typically done by the development team as part of the coding process.
有许多不同的软件测试技术,技术的选择取决于项目的具体需求和被测软件的类型。一些常见的测试技术包括:- 单元测试:单元测试是一种涉及测试软件系统各个单元或组件的技术。它通常由开发团队在编码过程中完成。
- Integration testing: Integration testing is a technique that involves testing the integration of different components or modules of a software system. It is typically done after unit testing to ensure that the components work together as intended.
- System testing: System testing is a technique that involves testing the entire software system as a whole. It is typically done after integration testing to ensure that the system meets the specified requirements and works as intended.
Acceptance testing: Acceptance testing is a technique that involves testing the software from the perspective of the end user. It is typically done by the development team or by a separate testing team to ensure that the software is user-friendly and meets the needs of the users.
To test software, you need to plan the testing process, design test cases, execute the tests, and analyze the results. Testing involves both manual testing (where a tester manually performs test cases) and automated testing (where test cases are executed automatically using tools and scripts).要测试软件,你需要规划测试流程、设计测试用例、执行测试并分析结果。测试既包括手动测试(测试人员手动执行测试用例),也包括自动化测试(使用工具和脚本自动执行测试用例)。
803. How do you approach solving a complex programming problem?
你如何解决复杂的编程问题?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6d58d557c902bc8631 | 官方: 否 | 付费: 否
答案:
Solving a complex programming problem can be a challenging and time-consuming task, but there are a few steps you can take to approach the problem in a systematic and organized way:
解决复杂的编程问题可能是一项具有挑战性且耗时的工作,但你可以采取几个步骤来以系统化和有条理的方式处理问题:
Understand the problem: The first step in solving a complex programming problem is to understand the problem. This involves reading the problem statement carefully and clarifying any ambiguities or uncertainties. You should also understand the inputs, outputs, and any constraints or assumptions that apply to the problem. 2. Break down the problem: Once you understand the problem, the next step is to break it down into smaller, more manageable pieces. This involves identifying the subproblems or subgoals that need to be solved in order to solve the main problem. Breaking down the problem can help you to understand the problem better and make it easier to solve. 3. Develop a plan: After breaking down the problem, the next step is to develop a plan for solving the problem. This involves identifying the steps or actions that you need to take to solve the problem and organizing them in a logical sequence. Having a clear plan can help you to stay focused and make progress on the problem. 4. Implement the plan: With a clear plan in place, the next step is to implement the plan. This involves writing the code that solves the problem and testing it to ensure that it works as intended. 5. Refine the solution: After implementing the initial solution, you may need to refine it to make it more efficient, robust, or scalable. This involves optimizing the code, testing it, and making any necessary improvements.
- 理解问题:解决复杂编程问题的第一步是理解问题。这包括仔细阅读问题陈述并澄清任何含糊或不明确之处。你还应了解问题适用的输入、输出以及任何约束或假设。 2. 分解问题:一旦你理解了问题,下一步就是将其分解为更小、更易管理的部分。这包括确定需要解决以解决主问题的子问题或子目标。分解问题可以帮助你更好地理解问题并使其更容易解决。 3. 制定计划:分解问题后,下一步是制定解决问题的计划。这包括确定解决问题所需的步骤或操作,并将其按逻辑顺序组织起来。有一个清晰的计划可以帮助你保持专注并推进问题。 4. 实施计划:在制定了清晰计划后,下一步是实施计划。这包括编写解决问题的代码并测试以确保其按预期运行。 5. 改进解决方案:在实施初始解决方案后,你可能需要对其进行改进以使其更高效、更健壮或更具可扩展性。这包括优化代码、测试并进行任何必要的改进。
In summary, solving a complex programming problem involves understanding the problem, breaking it down into smaller pieces, developing a plan, implementing the plan, and refining the solution. It can be a challenging and time-consuming task, but following a systematic and organized approach can help you to solve the problem effectively.
总而言之,解决复杂的编程问题涉及理解问题、将其分解为更小的部分、制定计划、实施计划以及改进解决方案。这可能是一项具有挑战性且耗时的工作,但遵循系统化和有条理的方法可以帮助你有效解决问题。
804. How do you design and implement a scalable system?
你如何设计和实现可扩展的系统?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6d58d557c902bc863a | 官方: 否 | 付费: 否
答案:
Designing and implementing a scalable system involves considering several factors that affect the system's ability to handle increasing workloads and user demands. Here are some steps you can follow to design and implement a scalable system:
设计和实现可扩展的系统涉及考虑影响系统处理不断增加的工作负载和用户需求能力的几个因素。以下是你设计并实现可扩展系统时可以遵循的一些步骤:
Define the requirements: The first step is to define the requirements of the system. This involves identifying the expected workloads, user demands, and performance goals of the system. Defining the requirements allows you to understand the specific scalability needs of the system and design the system accordingly. 2. Identify bottlenecks: The next step is to identify the potential bottlenecks in the system that could limit its scalability. Bottlenecks can occur at various points in the system, such as the database, the network, or the server. Identifying bottlenecks allows you to design the system to eliminate or mitigate these bottlenecks and improve its scalability. 3. Design for horizontal scalability: One way to improve the scalability of a system is to design it for horizontal scalability. This involves designing the system to be able to handle increasing workloads by adding more resources, such as servers, rather than upgrading a single resource, such as a powerful server. Horizontal scalability allows the system to scale out and handle increasing workloads more easily. 4. Use load balancing: Another way to improve the scalability of a system is to use load balancing to distribute the workload among multiple resources. This can be done using load balancers that distribute incoming requests among a pool of servers, database shards that divide the data among multiple database servers, or content delivery networks (CDNs) that distribute static content among multiple servers. 5. Use caching: Caching is the process of storing frequently accessed data in memory or on disk to improve the performance of the system. Using caching can help to reduce the load on the database and other resources, improving the scalability and performance of the system. 6. Monitor and optimize: Finally, it is important to continuously monitor and optimize the scalability of the system. This involves monitoring the performance and resource usage of the system and identifying potential bottlenecks or issues. It also involves using optimization techniques, such as load testing, performance tuning, and capacity planning, to improve the scalability of the system.
- 定义需求:第一步是定义系统的需求。这包括确定预期的系统工作负载、用户需求和性能目标。定义需求使你能了解系统的特定可扩展性需求并据此设计系统。 2. 识别瓶颈:下一步是识别系统中可能限制其可扩展性的潜在瓶颈。瓶颈可能出现在系统的各个点,例如数据库、网络或服务器。识别瓶颈使你能设计系统以消除或缓解这些瓶颈并提高其可扩展性。 3. 设计为水平扩展:提高系统可扩展性的一种方法是将其设计为支持水平扩展。这包括设计系统通过添加更多资源(如服务器)来处理不断增加的工作负载,而不是升级单一资源(如高性能服务器)。水平扩展允许系统向外扩展,更轻松地处理不断增加的工作负载。 4. 使用负载均衡:提高系统可扩展性的另一种方法是使用负载均衡将工作负载分布在多个资源之间。这可以通过使用负载均衡器将传入请求分布在一组服务器之间、使用数据库分片将数据分布在多个数据库服务器之间,或使用内容分发网络(CDN)将静态内容分布在多个服务器之间来实现。 5. 使用缓存:缓存是将频繁访问的数据存储在内存或磁盘上以提高系统性能的过程。使用缓存有助于减少数据库和其他资源的负载,从而提高系统的可扩展性和性能。 6. 监控和优化:最后,持续监控和优化系统的可扩展性很重要。这包括监控系统的性能和资源使用情况,并识别潜在的瓶颈或问题。它还包括使用优化技术,如负载测试、性能调优和容量规划,来提高系统的可扩展性。
Example: To design a system that can scale to your first 100 million users, you need to focus on several key areas, including:
示例:为了设计一个可以扩展到首批1亿用户的系统,你需要关注几个关键领域,包括:
Architecture: Use a distributed system architecture that can handle high volumes of traffic and user requests, and can scale horizontally by adding more servers or nodes as needed. For example, Netflix uses a microservices architecture to enable rapid development and deployment of new features and to handle millions of users streaming video content simultaneously. 2. Database: Choose a database system that can handle large amounts of data and high levels of concurrency, such as a NoSQL database like Cassandra or MongoDB. These databases can distribute data across multiple nodes and can scale horizontally to handle increasing loads. For example, Twitter uses a sharded MySQL database to store and manage billions of tweets and user data. 3. Caching: Implement caching strategies to reduce the load on your database and improve application performance. This can include using in-memory caches like Redis or Memcached, or content delivery networks (CDNs) to cache static content like images or videos. For example, Airbnb uses a combination of Redis caching and CDNs to improve the performance of its website and mobile app. 4. Load balancing: Use load balancing techniques to distribute traffic across multiple servers or nodes, and to ensure high availability and reliability. This can include using load balancers like NGINX or HAProxy or using auto-scaling groups on cloud platforms like AWS or Azure. For example, Uber uses a combination of load balancing, auto-scaling, and microservices architecture to handle millions of ride requests per day.
- 架构:使用可以处理高流量和用户请求的分布式系统架构,并且可以通过添加更多服务器或节点按需水平扩展。例如,Netflix使用微服务架构来实现新功能的快速开发和部署,并同时处理数百万用户流式播放视频。 2. 数据库:选择可以处理大量数据和高并发水平的数据库系统,例如像Cassandra或MongoDB这样的NoSQL数据库。这些数据库可以将数据分布在多个节点上,并可以水平扩展以处理不断增加的负载。例如,Twitter使用分片的MySQL数据库来存储和管理数十亿条推文和用户数据。 3. 缓存:实施缓存策略以减少数据库负载并提高应用程序性能。这包括使用像Redis或Memcached这样的内存缓存,或使用内容分发网络(CDN)来缓存静态内容,如图片或视频。例如,Airbnb结合使用Redis缓存和CDN来改进其网站和移动应用的性能。 4. 负载均衡:使用负载均衡技术将流量分布在多个服务器或节点之间,并确保高可用性和可靠性。这包括使用像NGINX或HAProxy这样的负载均衡器,或在AWS或Azure等云平台上使用自动扩展组。例如,Uber结合使用负载均衡、自动扩展和微服务架构来每天处理数百万次乘车请求。
By focusing on these key areas, you can design a system that can scale to handle your first 100 million users and beyond, while maintaining high levels of performance, reliability, and security.
通过关注这些关键领域,你可以设计一个系统,使其能扩展以处理你的首批1亿用户及更多用户,同时保持高性能、高可靠性和高安全性。
We can define the scalability of the system with a small example by using the above image. In the above image, we have 2 different servers that are independent of handling their operations. Now if any user visits the server then the request goes to the load balancer, and the load balancer will route the request to the server based on the availability.
我们可以通过使用上述图片中的一个小例子来定义系统的可扩展性。在上述图片中,我们有2个彼此独立处理各自操作的服务器。现在,如果有任何用户访问服务器,请求会发送到负载均衡器,负载均衡器将根据可用性将请求路由到服务器。
Suppose any one of the servers goes down then there is another server is running up to handle the requests.
假设其中任何一个服务器宕机,则有另一个服务器正在运行以处理请求。
805. What are the limitations of inheritance?
继承有哪些局限性?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6d58d557c902bc8642 | 官方: 否 | 付费: 否
答案:
Inheritance can be a powerful tool in object-oriented programming, but it also has some limitations. Some of the limitations of inheritance are:
继承可以是面向对象编程中的强大工具,但它也有一些局限性。继承的一些局限包括:
Tight Coupling: Inheritance can lead to tight coupling between the base class and the derived class, which means that changes made in the base class can have unintended effects on the derived class. 2. Inflexibility: Inheritance can be inflexible because once a subclass is created, it cannot be easily modified or extended. 3. Increased Complexity: Inheritance can make code more complex and harder to understand, especially if there are multiple levels of inheritance or if the inheritance is used excessively. 4. Fragility: Changes to the base class can break the derived classes, and it can be difficult to predict the impact of those changes. 5. Overuse: Inheritance can be overused, leading to complex and hard-to-maintain code. It is important to use inheritance judiciously and only when it is appropriate and necessary. 6. Inefficient Memory Usage: In some cases, inheritance can lead to inefficient memory usage, as objects may have redundant data or functionality.
- 紧密耦合:继承可能导致基类和派生类之间的紧密耦合,这意味着对基类所做的更改可能对派生类产生意外影响。2. 不灵活性:继承可能不够灵活,因为一旦创建了子类,就不容易修改或扩展。3. 复杂性增加:继承可能使代码更复杂且更难理解,尤其是在继承级别较多或过度使用时。4. 脆弱性:对基类的更改可能会破坏派生类,并且很难预测这些更改的影响。5. 过度使用:继承可能被过度使用,导致复杂且难以维护的代码。重要的是要明智地使用继承,并且仅在适当和必要时使用。6. 内存使用效率不高:在某些情况下,继承可能导致内存使用效率低下,因为对象可能包含冗余数据或功能。
It is important to consider these limitations when using inheritance in object-oriented programming and to balance the benefits of inheritance against its potential drawbacks.
在面向对象编程中使用继承时,考虑这些局限性非常重要,并且要平衡继承的好处与其潜在的缺点。
806. How can we use R to predict something?
我们如何使用R来预测某事物?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6d58d557c902bc8648 | 官方: 否 | 付费: 否
答案:
There are several ways to use R to predict something, depending on the type of prediction you want to make and the data you have available. Here are some common approaches:
根据您想要进行的预测类型以及您拥有的数据,使用R进行预测有多种方法。以下是一些常见的方法:
Statistical modeling: R has a wide range of functions for statistical modeling, including linear regression, logistic regression, and generalized linear models. You can use these functions to fit a model to your data and use the model to make predictions about future outcomes. 2. Machine learning: R also has a wide range of functions and packages for machine learning, including decision trees, random forests, support vector machines, and neural networks. You can use these algorithms to train a model on your data and use the model to make predictions about future outcomes. 3. Data visualization: R has a wide range of functions and packages for data visualization, including scatter plots, line plots, bar plots, and heat maps. You can use these tools to visualize your data and identify trends or patterns that may help you make predictions about future outcomes. 4. Data preprocessing: Before you can use R to make predictions, you may need to preprocess your data to prepare it for analysis. This may involve cleaning the data, handling missing values, transforming the data, and selecting relevant features. R has a wide range of functions and packages for data preprocessing, including tools for data cleaning, imputation, scaling, and feature selection.
- 统计建模:R具有广泛的统计建模函数,包括线性回归、逻辑回归和广义线性模型。您可以使用这些函数将模型拟合到数据,并使用该模型预测未来结果。2. 机器学习:R还拥有广泛的机器学习和函数、包,包括决策树、随机森林、支持向量机和神经网络。您可以使用这些算法在数据上训练模型,并使用模型预测未来结果。3. 数据可视化:R具有广泛的数据可视化函数和包,包括散点图、线图、柱状图和热图。您可以使用这些工具可视化数据,并识别可能帮助预测未来结果的趋势或模式。4. 数据预处理:在使用R进行预测之前,您可能需要预处理数据以准备分析。这可能涉及清理数据、处理缺失值、转换数据以及选择相关特征。R具有广泛的数据预处理函数和包,包括数据清理、插补、缩放和特征选择工具。
807. How do you stay up-to-date with the latest technologies and trends in the industry?
您如何保持与行业最新技术和趋势同步?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6d58d557c902bc8652 | 官方: 否 | 付费: 否
答案:
There are several ways to stay up-to-date with the latest technologies and trends in the industry:
有几种方法可以保持与行业最新技术和趋势同步:
Subscribe to newsletters and industry publications: One way to stay up-to-date is to subscribe to newsletters and industry publications that cover the latest technologies and trends in the field. This can include newsletters from tech companies, trade magazines, and online blogs. 2. Attend conferences and workshops: Attending conferences and workshops is a great way to learn about the latest technologies and trends, as well as network with other professionals in the field. Many conferences and workshops offer presentations and demos from experts in the industry, as well as opportunities for hands-on learning. 3. Take online courses and tutorials: Online courses and tutorials are a convenient way to learn about new technologies and trends from the comfort of your own home. Many online platforms, such as Coursera, Udemy, and edX, offer a wide range of courses and tutorials on various topics in the field. 4. Join online communities: Online communities, such as forums, groups, and social media platforms, are a great way to connect with other professionals in the field and stay up-to-date on the latest technologies and trends. You can participate in discussions, ask questions, and share resources with others in the community. 5. Experiment with new technologies: Finally, one of the best ways to stay up-to-date is to experiment with new technologies and trends on your own. This can involve setting up a lab or a development environment and trying out new tools and technologies. This hands-on approach can help you learn more about the technologies and how they work, and it can also help you stay up-to-date with the latest trends in the field.
- 订阅新闻通讯和行业出版物:保持最新状态的一种方法是订阅涵盖该领域最新技术和趋势的新闻通讯和行业出版物。这可能包括科技公司的新闻通讯、行业杂志和在线博客。2. 参加会议和工作坊:参加会议和工作坊是了解最新技术和趋势的绝佳方式,同时也可以与该领域的其他专业人士建立联系。许多会议和工作坊提供行业专家的演示和展示,以及实践学习的机会。3. 参加在线课程和教程:在线课程和教程是方便在家学习新技术和趋势的方式。许多在线平台,如Coursera、Udemy和edX,提供该领域各种主题的广泛课程和教程。4. 加入在线社区:在线社区,如论坛、群组和社交媒体平台,是与该领域其他专业人士联系并了解最新技术和趋势的好方式。您可以参与讨论、提问,并与社区中的其他人分享资源。5. 尝试新技术:最后,保持最新状态的最佳方式之一是亲自尝试新技术和趋势。这可能涉及设置实验室或开发环境,并试用新工具和技术。这种实践方法可以帮助您更好地了解技术及其工作原理,并有助于您跟上该领域的最新趋势。
In summary, there are several ways to stay up-to-date with the latest technologies and trends in the industry. The candidate should answer honestly on what they follow to stay up-to-date. This is important as they might be asked follow-up questions on what they say. It is essential for the candidates to be truthful and transparent about their sources of information and how they keep themselves informed. This will demonstrate their reliability and commitment to staying knowledgeable and relevant in their field. It will also enable the interviewer to assess their potential for learning and adapting to new trends and developments.
总之,有几种方法可以保持与行业最新技术和趋势同步。候选人应该诚实回答他们关注什么以保持最新状态。这很重要,因为他们可能会就所说内容被提出后续问题。候选人必须对其信息来源以及如何保持信息了解程度诚实和透明。这将展示他们的可靠性以及在该领域保持知识和相关的承诺。这也将使面试官能够评估他们学习和适应新趋势和发展的潜力。
808. What Is a Linear Regression Model? How Do You Go About Building It?
什么是线性回归模型?您如何构建它?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6d58d557c902bc8655 | 官方: 否 | 付费: 否
答案:
A linear regression model is a statistical method that is used to model the relationship between two continuous variables. It is a commonly used model in machine learning and statistics to predict a continuous output variable based on one or more input variables.
线性回归模型是一种统计方法,用于建模两个连续变量之间的关系。它是机器学习和统计学中常用的一种模型,用于基于一个或多个输入变量预测连续输出变量。
The basic idea behind linear regression is to fit a straight line to a set of data points, which allows us to make predictions about the relationship between the variables. The line is defined by an equation of the form:
线性回归的基本思想是拟合一条直线到一组数据点,这使我们能够对变量之间的关系进行预测。该直线由如下形式的方程定义:
y = b0 + b1 * x
y = b0 + b1 * x
where y is the output variable, x is the input variable, b0 is the intercept, and b1 is the slope of the line.
其中y是输出变量,x是输入变量,b0是截距,b1是直线的斜率。
Building a linear regression model typically involves the following steps:
构建线性回归模型通常涉及以下步骤:
Data collection: Collect the data on the input and output variables that you want to model. 2. Data preparation: Clean the data, remove missing values, and perform any necessary transformations. 3. Model selection: Choose the appropriate type of linear regression model (simple or multiple) based on the number of input variables. 4. Model training: Split the data into a training set and a testing set, and use the training set to fit the model to the data. 5. Model evaluation: Evaluate the model on the testing set to determine how well it generalizes to new data. 6. Model improvement: Use techniques such as regularization, feature selection, or parameter tuning to improve the performance of the model.
- 数据收集:收集你想要建模的输入和输出变量的数据。 2. 数据准备:清理数据,删除缺失值,并执行任何必要的转换。 3. 模型选择:根据输入变量的数量选择合适类型的线性回归模型(简单或多元)。 4. 模型训练:将数据分成训练集和测试集,并使用训练集拟合模型到数据上。 5. 模型评估:在测试集上评估模型,以确定它对新数据的泛化能力。 6. 模型改进:使用诸如正则化、特征选择或参数调优等技术来提高模型的性能。
The performance of a linear regression model can be evaluated using metrics such as the mean squared error (MSE), which measures the average squared difference between the predicted values and the actual values. The goal is to minimize the MSE and improve the accuracy of the model.
线性回归模型的性能可以通过诸如均方误差(MSE)等指标进行评估,该指标衡量预测值与实际值之间的平均平方差。目标是使MSE最小化并提高模型的准确性。
Overall, a linear regression model can be a powerful tool for predicting the relationship between two continuous variables, but it requires careful data preparation, model selection, and evaluation to build an effective and accurate model.
总的来说,线性回归模型可以成为预测两个连续变量之间关系的强大工具,但要构建有效且准确的模型,需要仔细的数据准备、模型选择和评估。
Interview Preparation Resources
面试准备资源
- https://www.interviewbit.com/tcs-nqt-interview-questions/
- https://www.interviewbit.com/tcs-ninja-interview-questions/
- https://www.interviewbit.com/technical-interview-questions/
809. What is the difference between a programming language and a scripting language?
编程语言和脚本语言之间有什么区别?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6d58d557c902bc865d | 官方: 否 | 付费: 否
答案:
The table below provides a comprehensive overview of the differences between Programming languages and Scripting languages.
下表提供了编程语言和脚本语言之间差异的全面概览。
| Category 类别 | Programming Languages 编程语言 | Scripting Languages 脚本语言 |
|---|---|---|
| Definition 定义 | A programming language is a formal language that is used to write instructions that can be executed by a computer. 编程语言是一种形式语言,用于编写可由计算机执行的指令。 | A scripting language is a type of programming language that is used to write scripts, which are sets of instructions that are executed by an interpreter rather than being compiled into an executable program. 脚本语言是一种编程语言,用于编写脚本,这些脚本是由解释器执行的一组指令,而不是编译成可执行程序。 |
| Compilation 编译 | Source code is compiled into machine code before execution. 源代码在执行前被编译成机器代码。 | Code is interpreted at runtime without a separate compilation step. 代码在运行时被解释,没有单独的编译步骤。 |
| Type System 类型系统 | Typically have a stricter, static type system. 通常具有更严格、静态的类型系统。 | Usually have a more flexible, dynamic type of system. 通常具有更灵活、动态的类型系统。 |
| Control Structures 控制结构 | Tend to have more complex control structures, like loops and conditionals. 往往具有更复杂的控制结构,如循环和条件语句。 | Usually have simpler control structures that are optimized for ease of use. 通常具有更简单的控制结构,优化了易用性。 |
| Execution Speed 执行速度 | Generally faster, as they are compiled and optimized ahead of time. 通常更快,因为它们已提前编译和优化。 | Typically slower, as they are interpreted at runtime. 通常较慢,因为它们在运行时被解释。 |
| Development 开发 | Often used for developing large, complex applications. 常用于开发大型、复杂的应用程序。 | Typically used for smaller, simpler tasks or automating system tasks. 通常用于较小、较简单的任务或自动化系统任务。 |
| Examples 示例 | C++, Java, Python, Ruby, Swift. C++、Java、Python、Ruby、Swift。 | Bash, JavaScript, PHP, Perl, Python (some use cases). Bash、JavaScript、PHP、Perl、Python(某些用例)。 |
810. What is a data type and how is it used in programming?
什么是数据类型,它在编程中是如何使用的?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6d58d557c902bc8663 | 官方: 否 | 付费: 否
答案:
In programming, a data type is a classification of data that defines the type of value that a variable can hold. Different programming languages have different data types, and the choice of data type affects how the data is stored, processed, and manipulated by the program.
在编程中,数据类型是对数据的分类,定义了变量可以持有的值的类型。不同的编程语言有不同的数据类型,数据类型的选择会影响程序如何存储、处理和操作数据。
Some common data types include: - Integer: An integer is a whole number without a decimal point. It can be positive, negative, or zero.
一些常见的数据类型包括: - 整数:整数是没有小数点的整数,可以是正数、负数或零。
- Floating point: A floating point number is a number with a decimal point. It can be positive, negative, or zero.
- Boolean: A boolean value is a binary value that can be either true or false.
- String: A string is a sequence of characters, such as a word or phrase.
- Array: An array is a data type that stores a collection of values of the same data type.
- Struct: A struct is a data type that consists of a collection of related values.
Enum: An enum is a data type that defines a set of related values.
Data types are used to ensure that a program uses data in a consistent and predictable way. They also help to prevent errors and ensure that the program is efficient and optimized for the specific needs of the application.数据类型用于确保程序以一致且可预测的方式使用数据。它们还有助于防止错误,并确保程序高效且针对应用程序的特定需求进行优化。
811. What is a programming paradigm and can you name some examples?
什么是编程范式,你能举出一些例子吗?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6d58d557c902bc8666 | 官方: 否 | 付费: 否
答案:
A programming paradigm is a style or approach to programming that is based on a specific set of principles and concepts. It defines how a program should be structured and how different elements of the program should interact with each other.
编程范式是一种基于特定原则和概念的编程风格或方法。它定义了程序应如何结构化,以及程序的不同元素应如何相互交互。
There are several programming paradigms, including: - Imperative programming: This paradigm is based on the idea of using statements to change the state of a program. It focuses on modifying variables and data structures and is based on the idea of a step-by-step set of instructions. Examples of imperative languages include C, C++, and Java.
有几种编程范式,包括: - 命令式编程:这种范式基于使用语句来改变程序状态的想法。它专注于修改变量和数据结构,并基于一步步的指令集。命令式语言的例子包括C、C++和Java。
- Declarative programming: This paradigm is based on the idea of specifying the desired result of a program rather than the steps required to achieve it. It focuses on describing the problem to be solved rather than the solution itself. Examples of declarative languages include SQL, HTML, and XML.
- Functional programming: This paradigm is based on the idea of treating computation as the evaluation of mathematical functions. It emphasizes the use of functions and immutable data, and is based on the idea of avoiding side effects and mutable states. Examples of functional languages include Haskell, Lisp, and ML.
Object-oriented programming: This paradigm is based on the idea of organizing code into objects that represent real-world entities and the actions that can be performed on them. It emphasizes the use of encapsulation, inheritance, and polymorphism. Examples of object-oriented languages include Java, Python, and C#.
Each programming paradigm has its own set of characteristics and principles, and different languages are designed to support different paradigms. Many modern programming languages support multiple paradigms, allowing developers to choose the approach that best fits the problem at hand.每种编程范式都有其自身的特征和原则,不同的语言被设计为支持不同的范式。许多现代编程语言支持多种范式,允许开发者选择最适合当前问题的方法。
812. What is a computer program, and how does it work?
什么是计算机程序,它是如何工作的?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6e58d557c902bc866b | 官方: 否 | 付费: 否
答案:
A computer program is a set of instructions that a computer can execute to perform a specific task or solve a problem. A computer program is also referred to as software, and it is a key component of a computer system.
计算机程序是计算机能够执行以完成特定任务或解决问题的一组指令。计算机程序也被称为软件,它是计算机系统的关键组成部分。
Computer programs are written in programming languages, which are used to write instructions in a way that the computer can understand. There are many programming languages, each with its own syntax and rules for writing code.
计算机程序是用编程语言编写的,这些语言用于以计算机能够理解的方式编写指令。有许多编程语言,每种语言都有其自身的语法和编写代码的规则。
To write a computer program, a developer writes a series of instructions in a text file using a text editor or Integrated Development Environment (IDE). The instructions are then saved as a file with a specific extension, such as .py for Python or .java for Java.
要编写计算机程序,开发人员使用文本编辑器或集成开发环境(IDE)在文本文件中编写一系列指令。然后,指令被保存为具有特定扩展名的文件,例如Python的.py或Java的.java。
To run a computer program, the developer must first compile the code, which translates the instructions into a form that the computer can execute. The compiled code is then loaded into the computer's memory and executed by the central processing unit (CPU).
要运行计算机程序,开发人员必须首先编译代码,这将指令转换为计算机可以执行的形式。编译后的代码随后被加载到计算机的内存中,并由中央处理器(CPU)执行。
As the program is executed, the computer follows the instructions in the program, performing tasks such as performing calculations, displaying output, and interacting with other systems or devices. The program continues to run until it reaches the end of the instructions or encounters an error or exception.
当程序被执行时,计算机遵循程序中的指令,执行诸如进行计算、显示输出以及与其它系统或设备交互等任务。程序持续运行,直到达到指令的末尾或遇到错误或异常。
Computer programs are an essential part of modern computing and are used in a wide range of applications, including data processing, web development, mobile apps, and artificial intelligence.
计算机程序是现代计算的重要组成部分,广泛应用于数据处理、网页开发、移动应用和人工智能等领域。
813. What is a function in programming and how do you define and call it?
编程中的函数是什么,你如何定义和调用它?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6e58d557c902bc866e | 官方: 否 | 付费: 否
答案:
In programming, a function is a block of code that performs a specific task and returns a result. Functions are a way to organize and reuse code, and they allow a program to be divided into smaller, modular units that can be tested and debugged independently.
在编程中,函数是执行特定任务并返回结果的代码块。函数是组织和重用代码的一种方式,它们允许程序被划分为更小、模块化的单元,这些单元可以独立测试和调试。
To define a function in most programming languages, you need to specify the name of the function, the list of parameters it takes (if any), and the block of code that makes up the function body.
在大多数编程语言中,要定义函数,你需要指定函数的名称、它接受的参数列表(如果有的话)以及构成函数体的代码块。
Here is an example of how to define a function in Python:
以下是在Python中定义函数的一个示例:
def greet(name):
def greet(name):
print("Hello, " + name)
print("Hello, " + name)
This function takes a single parameter called "name" and prints a greeting to the screen.
这个函数接受一个名为“name”的单一参数,并向屏幕打印问候语。
To call a function, you simply use its name followed by a set of parentheses. For example:
要调用函数,你只需使用其名称后跟一组括号。例如:
greet("John")
greet("John")
This will call the "greet" function and pass the string "John" as an argument to the function. The function will then execute the code in the function body, in this case, printing "Hello, John" to the screen.
这将调用“greet”函数,并将字符串“John”作为参数传递给该函数。然后,函数将执行函数体中的代码,在这种情况下,向屏幕打印“Hello, John”。
Functions can also return a result by using the "return" statement. For example:
函数还可以使用“return”语句返回结果。例如:
def add(x, y):
def add(x, y):
return x + y
return x + y
This function takes two parameters, "x" and "y", and returns their sum. To call this function and get the result, you can use it in an expression:
这个函数接受两个参数,“x”和“y”,并返回它们的和。要调用此函数并获取结果,可以在表达式中使用它:
sum = add(2, 3)
sum = add(2, 3)
print(sum) # Output: 5
print(sum) # 输出:5
Functions are an important concept in programming and are used to modularize code and make it easier to write, test, and maintain.
函数是编程中的一个重要概念,用于模块化代码,使其更易于编写、测试和维护。
814. What is a loop in programming and can you give an example of how it is used?
编程中的循环是什么?你能给出一个使用它的示例吗?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6e58d557c902bc8671 | 官方: 否 | 付费: 否
答案:
In programming, a loop is a control structure that allows a block of code to be executed repeatedly. Loops are a way to iterate over a sequence of values or perform a task multiple times.
在编程中,循环是一种控制结构,允许代码块被重复执行。循环是遍历一系列值或多次执行任务的一种方式。
There are three types of loops - for loops, while loops, and do-while loops. - A for loop is used to iterate over a sequence of values, such as a list or an array. The loop variable takes on each value in the sequence, one at a time, and the loop body is executed for each value. This has been represented in the flowchart below:
有三种类型的循环——for循环、while循环和do-while循环。- for循环用于遍历一系列值,例如列表或数组。循环变量依次取序列中的每个值,并为每个值执行循环体。这已在下面的流程图中表示:
Here is an example of a for loop in Python:
以下是Python中for循环的一个示例:
for i in range(5):
for i in range(5):
print(i)
print(i)
This for loop will iterate over the values 0, 1, 2, 3, and 4 and print each value to the screen. - A while loop is used to execute a block of code repeatedly as long as a certain condition is true. The loop body is executed until the condition becomes false. This has been represented in the flowchart below:
此for循环将遍历值0、1、2、3和4,并将每个值打印到屏幕上。- while循环用于在某个条件为真时重复执行一段代码块。循环体将一直执行,直到条件变为假。这已在下面的流程图中表示:
Here is an example of a while loop in Python:
以下是Python中while循环的一个示例:
x = 0 while x < 5:
x = 0
print(x) x += 1
print(x) x += 1
This while loop will print the values 0, 1, 2, 3, and 4 to the screen, as the value of "x" is less than 5 and is being incremented by 1 each time the loop body is executed. - A do-while loop is similar to a while loop, but the loop body is executed at least once before the condition is checked as shown in the flowchart below:
这个 while 循环会将值 0、1、2、3 和 4 输出到屏幕上,因为“x”的值小于 5,并且每次执行循环体时都会将其递增 1。 - do-while 循环与 while 循环类似,但循环体至少执行一次后才检查条件,如下面的流程图所示:
Here is an example of a do-while loop in Java:
以下是一个 Java 中 do-while 循环的示例:
int x = 0;
int x = 0;
do {
do {
System.out.println(x);
System.out.println(x);
x++;
x++;
}while(x < 5);
}while(x < 5);
This do-while loop will print the values 0, 1, 2, 3, and 4 to the screen, as the value of "x" is incremented by 1 each time the loop body is executed.
这个 do-while 循环会将值 0、1、2、3 和 4 输出到屏幕上,因为每次执行循环体时都会将“x”的值递增 1。
Loops are an important concept in programming and are used to perform tasks repeatedly or iterate over a sequence of values. They are a useful way to simplify code and avoid the need to write repetitive code blocks.
循环是编程中的一个重要概念,用于重复执行任务或迭代一系列值。它们是简化代码和避免编写重复代码块的有效方式。
815. What is the Difference between call by value and call by reference?
按值调用和按引用调用有什么区别?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6e58d557c902bc8674 | 官方: 否 | 付费: 否
答案:
Call by value and call by reference are two ways in which a function can be passed arguments in some programming languages.
按值调用和按引用调用是一些编程语言中函数传递参数的两种方式。
Call by value is a method of passing arguments to a function in programming, where the value of the argument is copied and passed to the function, rather than the actual variable or object being passed. - When a function is called with Call by value, a new memory location is created to store the copied value, which is then used by the function for its computations.
按值调用是一种在编程中向函数传递参数的方法,其中参数的值被复制并传递给函数,而非传递实际的变量或对象。 - 当使用按值调用调用函数时,会创建一个新的内存位置来存储复制的值,然后函数使用该值进行其计算。
- Any changes made to the copied value within the function will not affect the original variable or object in the calling code, as they are separate entities.
This approach is commonly used in C/C++, Java, and Python programming languages. Let's see it with an example code in C++ -
Call by value:按值调用:
void increment(int num) {
void increment(int num) {
num++; // increment num by 1
num++; // 将 num 递增 1
printf("Inside increment function: %d\n", num);
在增量函数内部打印:%d\n,num
}
int main() {
int main() {
int x = 5;
int x = 5;
printf("Before calling increment function: %d\n", x);
printf("在调用 increment 函数之前: %d\n", x);
increment(x);
增量(x);
printf("After calling increment function: %d\n", x);
printf("在调用 increment 函数之后: %d\n", x);
return 0;
return 0;
}
In this example, we define a function called increment that takes an integer parameter num and increments it by 1. In the main function, we declare an integer variable x and initialize it to 5. We then call the increment function with x as the argument. When the increment function is called, a copy of the value of x is passed to the function, and the function modifies the copy. The original value of x is not affected by the function call.
在此示例中,我们定义了一个名为increment的函数,它接受一个整数参数num并将其增加1。在主函数中,我们声明一个整数变量x并将其初始化为5。然后我们用x作为参数调用increment函数。当调用increment函数时,x值的副本被传递给该函数,函数修改的是这个副本。x的原始值不受函数调用的影响。
The output of the program is:
程序的输出为:
Before calling increment function: 5
在调用 increment 函数之前:5
Inside increment function: 6
在 increment 函数内部:6
After calling increment function: 5
在调用增量函数之后:5
As you can see, the value of x in the main function is not changed by the call to the increment function.
如您所见,主函数中x的值并未因调用increment函数而改变。
Call by reference is a method of passing arguments to a function in programming, where the actual memory location of the variable or object is passed to the function, rather than a copy of its value. - When a function is called with the call by reference, any changes made to the passed variable or object within the function will affect the original variable or object in the calling code, as they refer to the same memory location.
按引用传递是编程中向函数传递参数的一种方法,其中变量或对象的实际内存位置被传递给函数,而不是其值的副本。- 当函数以按引用传递的方式被调用时,函数内对所传递变量或对象所做的任何更改都会影响调用代码中的原始变量或对象,因为它们指向相同的内存位置。
- This approach can be useful when working with large objects or when we want to modify the original value in the calling code. However, it requires careful management of memory and can be more error-prone than (Call by Value).
This approach is commonly used in programming languages like C++, and Python by using pointers or references to achieve Call by reference. Let's take an example code in c++.
Call by reference:按引用传递:
void increment(int* num) {
空增量(整数* 数字){
(*num)++; // increment num by 1
(*num)++; // 将 num 加 1
printf("Inside increment function: %d\n", *num);
printf("在 increment 函数内部: %d\n", *num);
}
int main() {
int main() {
int x = 5;
int x = 5;
printf("Before calling increment function: %d\n", x);
printf("在调用 increment 函数之前: %d\n", x);
increment(&x);
increment(&x);
printf("After calling increment function: %d\n", x);
printf("在调用 increment 函数之后: %d\n", x);
return 0;
return 0;
}
In this example, we define a function called increment that takes a pointer to an integer parameter num. The function dereferences the pointer using the * operator and increments the value pointed to by num by 1. In the main function, we declare an integer variable x and initialize it to 5. We then call the increment function with the address of x as the argument using the & operator. This means that the address of x is passed to the function, and the function can modify the value of x directly.
在此示例中,我们定义了一个名为 increment 的函数,它接受一个指向整数参数的指针 num。该函数使用 * 运算符解引用指针,并将 num 指向的值增加 1。在主函数中,我们声明了一个整数变量 x 并将其初始化为 5。然后,我们使用 & 运算符将 x 的地址作为参数调用 increment 函数。这意味着 x 的地址被传递给该函数,因此该函数可以直接修改 x 的值。
The output of the program is:
程序的输出为:
Before calling increment function: 5
在调用 increment 函数之前:5
Inside increment function: 6
在 increment 函数内部:6
After calling increment function: 6
在调用 increment 函数之后:6
As you can see, the value of x in the main function is changed by the call to the increment function, as we passed a pointer to the variable rather than a copy of its value.
如您所见,主函数中 x 的值通过调用 increment 函数发生了改变,因为我们传递的是指向该变量的指针,而不是其值的副本。
In the above image, the flow chart represents that if we want to go for the modification of the original value, then we can use Call by Reference otherwise, we can go for Call by Value approach.
在上图中,流程图表示如果我们想要修改原始值,则可以使用“按引用调用”;否则,我们可以使用“按值调用”方法。
816. Why do we use R?
为什么我们使用 R?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6e58d557c902bc8677 | 官方: 否 | 付费: 否
答案:
R is a programming language and software environment for statistical computing and data analysis. It is widely used in various fields, including finance, healthcare, marketing, and social sciences, and it is particularly popular among data scientists and statisticians.
R是一种用于统计计算和数据分析的编程语言和软件环境。它广泛应用于金融、医疗、市场营销和社会科学等多个领域,尤其在数据科学家和统计学家中非常流行。
There are several reasons why R is used:
使用R的原因有以下几点:
R has a large and active community of users and developers, who contribute a wide range of packages and tools to the R ecosystem. This makes it easy to find resources and support for using R. 2. R has a rich set of statistical and data analysis tools, including functions for statistical modeling, data visualization, and machine learning. This makes it a powerful tool for data analysis and statistical modeling. 3. R has a flexible and extensible architecture, which allows users to write their own functions and packages and to integrate with other tools and platforms. This makes it easy to customize and extend R to meet specific needs. 4. R is open-source and free to use, which makes it accessible to a wide range of users and organizations.
- R拥有庞大且活跃的用户和开发者社区,他们为R生态系统贡献了大量软件包和工具。这使得查找R的使用资源和支持变得容易。 2. R提供了丰富的统计和数据分析工具,包括统计建模、数据可视化和机器学习等功能。这使其成为数据分析和统计建模的强大工具。 3. R具有灵活且可扩展的架构,允许用户编写自己的函数和软件包,并与其他工具和平台集成。这使得根据特定需求定制和扩展R变得容易。 4. R是开源且免费使用的,这使得广大用户和组织都能轻松获取。
To learn more about the R project refer here.
要了解更多关于R项目的信息,请参阅此处。
817. What is an array in programming, and how is it used?
编程中的数组是什么,它如何使用?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6e58d557c902bc867d | 官方: 否 | 付费: 否
答案:
An array is a data structure in programming that stores a collection of values of the same data type. An array is an ordered sequence of elements that can be accessed by their index, which is the position of the element in the array.
数组是编程中的一种数据结构,用于存储相同数据类型的一组值。数组是一个有序的元素序列,可以通过索引访问,索引是元素在数组中的位置。
Arrays are useful for storing and manipulating large sets of data, as they allow you to store multiple values in a single data structure and access them efficiently. They are also useful for storing data that needs to be processed in a specific order.
数组对于存储和操作大型数据集非常有用,因为你可以将多个值存储在单个数据结构中并高效访问它们。它们也适用于存储需要按特定顺序处理的数据。
In the above image, we can see that instead of creating multiple variables for integer data type, we have created the integer array that contains multiple values of integer type. Adding multiple variables creates confusion and also it’s hard to maintain when we have so many variables. So, an array can be the best choice for that case.
在上图中,我们可以看到,不用为整数数据类型创建多个变量,我们创建了包含多个整数类型值的整数数组。添加多个变量会造成混淆,而且当变量很多时也难以维护。因此,在这种情况下,数组可能是最佳选择。
Using arrays can prevent confusion when dealing with large sets of data by storing them under a single variable name. Additionally, array algorithms such as bubble sort, selection sort, and insertion sort can assist in organizing data elements in a clear and efficient manner.
使用数组可以通过将数据存储在单个变量名下,避免处理大型数据集时的混乱。此外,诸如冒泡排序、选择排序和插入排序等数组算法可以帮助以清晰且高效的方式组织数据元素。
To access the elements in the array we can use indexing.
要访问数组中的元素,可以使用索引。
For Example - - To access the 1st element of the array arr, we can use -> arr[0].
示例: - 要访问数组arr的第一个元素,可以使用 -> arr[0]。
To access the 2nd element, we can use -> arr[1], and similarly to access the nth element of the array, we can use -> arr[n-1].
Here is an example of how to define and use an array in Python:以下是在Python中定义和使用数组的示例:
Define an array of integers
numbers = [10, 20, 30, 40, 50]
numbers = [10, 20, 30, 40, 50]
Access an element in the array
print(numbers[2]) # Output: 30
print(numbers[2]) # 输出: 30
Update an element in the array
numbers[4] = 60
numbers[4] = 60
Iterate over the array
for number in numbers:
for number in numbers:
print(number)
print(number)
Output
10
20
30
40
60
This code defines an array called "numbers" that contains the elements 10, 20, 30, 40, and 50. It then accesses the element at index 2 (which is 30) and prints it. Then it updates the element at index 4 (which is 50) to be 60. Finally, it iterates over the array and prints each element to the screen.
这段代码定义了一个名为“numbers”的数组,包含元素10、20、30、40和50。然后访问索引2处的元素(即30)并打印它。接着将索引4处的元素(即50)更新为60。最后,它遍历数组并将每个元素打印到屏幕上。
818. Write a program to count the number of vowels in a given string?
编写一个程序,统计给定字符串中元音字母的数量?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6e58d557c902bc8683 | 官方: 否 | 付费: 否
答案:
Here is a simple program that counts the number of vowels in a given string in Java:
下面是一个用Java编写的简单程序,用于统计给定字符串中元音字母的数量:
public class CountVowels {
public class CountVowels {
public static void main(String[] args) {
public static void main(String[] args) {
// Prompt the user to enter a string
// 提示用户输入一个字符串
System.out.print("Enter a string: ");
System.out.print("输入一个字符串: ");
Scanner input = new Scanner(System.in);
Scanner input = new Scanner(System.in);
String str = input.nextLine();
String str = input.nextLine();
// Initialize a counter variable to 0
// 将计数器变量初始化为0
int vowelCount = 0;
int vowelCount = 0;
// Convert the string to lower case
// 将字符串转换为小写
str = str.toLowerCase();
str = str.toLowerCase();
// Iterate through each character in the string
// 遍历字符串中的每个字符
for (int i = 0; i < str.length(); i++) {
for (int i = 0; i < str.length(); i++) {
// Check if the current character is a vowel
// 检查当前字符是否为元音
if (str.charAt(i) == 'a' || str.charAt(i) == 'e' || str.charAt(i) == 'i' || str.charAt(i) == 'o' || str.charAt(i) == 'u') {
if (str.charAt(i) == 'a' || str.charAt(i) == 'e' || str.charAt(i) == 'i' || str.charAt(i) == 'o' || str.charAt(i) == 'u') {
// If it is a vowel, increment the counter
// 如果是元音,则递增计数器
vowelCount++;
vowelCount++;
}
}
// Print the result
// 打印结果
System.out.println("Number of vowels: " + vowelCount);
System.out.println("Number of vowels: " + vowelCount);
}
}
Explanation: - The program begins by prompting the user to enter a string.
解释:- 程序首先提示用户输入一个字符串。
- The Scanner class is used to read the user's input.
- The input string is converted to lowercase using the toLowerCase() method. This is done to ensure that the program can count the vowels regardless of whether they are in upper or lower case.
- A for loop iterates through each character in the string.
- Inside the loop, an if statement checks whether the current character is a vowel (i.e., a, e, i, o, or u). If it is a vowel, the vowel count is incremented.
After the loop has completed, the program prints the number of vowels in the string.
The time complexity of this program is O(n), where n is the length of the input string. This is because the program iterates through each character in the string once, and the time required to check whether each character is a vowel is constant.该程序的时间复杂度为 O(n),其中 n 是输入字符串的长度。这是因为程序遍历字符串中的每个字符一次,并且检查每个字符是否为元音所需的时间是恒定的。
The space complexity of the program is also O(n), where n is the length of the input string. This is because the program stores the input string and the counter variable in memory, and the amount of memory required is proportional to the length of the string.
该程序的空间复杂度也是 O(n),其中 n 是输入字符串的长度。这是因为程序在内存中存储输入字符串和计数器变量,所需的内存量与字符串的长度成正比。
819. Explain the difference between Drop, Truncate and Delete?
解释 DROP、TRUNCATE 和 DELETE 之间的区别?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6e58d557c902bc868c | 官方: 否 | 付费: 否
答案:
In database management, DROP, TRUNCATE, and DELETE are three different operations that can be used to remove data from a table.
在数据库管理中,DROP、TRUNCATE 和 DELETE 是从表中删除数据的三种不同操作。
DROP : The DROP statement is used to delete a table or other database object from the database. When a table is dropped, all the data, indexes, and structure of the table are permanently deleted and cannot be recovered. The DROP statement is typically used to remove unnecessary or obsolete tables from the database. The syntax for DROP is:
DROP:DROP 语句用于从数据库中删除表或其他数据库对象。当表被删除时,表中的所有数据、索引和结构都会被永久删除,且无法恢复。DROP 语句通常用于删除数据库中不必要或过时的表。DROP 的语法为:
DROP DATABASE mydatabase;
DROP DATABASE mydatabase;
TRUNCATE : The TRUNCATE statement is used to delete all the data from a table, but it does not delete the table structure or indexes. This means that the table remains in the database, but it is empty. The TRUNCATE statement is typically used to remove all the data from a table in a single operation, and it is faster than deleting the rows one by one using the DELETE statement. The syntax for TRUNCATE is:
TRUNCATE:TRUNCATE 语句用于删除表中的所有数据,但它不会删除表结构或索引。这意味着表仍然存在于数据库中,但它是空的。TRUNCATE 语句通常用于一次性删除表中的所有数据,并且它比使用 DELETE 语句逐行删除更快。TRUNCATE 的语法为:
TRUNCATE TABLE mytable;
TRUNCATE TABLE mytable;
DELETE : The DELETE statement is used to delete specific rows from a table. It allows you to specify a WHERE clause to delete only the rows that meet certain conditions. The DELETE statement does not delete the table structure or indexes, and it does not reset the auto-increment value of the primary key. The DELETE statement is typically used to remove individual rows from a table. The syntax example for DELETE is:
DELETE:DELETE 语句用于从表中删除特定行。它允许您指定 WHERE 子句以仅删除满足特定条件的行。DELETE 语句不会删除表结构或索引,也不会重置主键的自增价值。DELETE 语句通常用于从表中删除单个行。DELETE 的语法示例为:
DELETE FROM mytable WHERE id=1;
DELETE FROM mytable WHERE id=1;
This would delete the row from mytable where id is equal to 1.
这将从mytable中删除id等于1的行。
820. What is the Difference between Having and Where Clause?
HAVING和WHERE子句有什么区别?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6f58d557c902bc8694 | 官方: 否 | 付费: 否
答案:
In SQL, the HAVING and WHERE clauses are used to filter rows from a SELECT statement based on specific conditions. However, there are some key differences between the two clauses:
在SQL中,HAVING和WHERE子句用于根据特定条件过滤SELECT语句中的行。然而,这两个子句之间存在一些关键差异:
The WHERE clause is used to filter rows before the GROUP BY clause is applied, while the HAVING clause is used to filter rows after the GROUP BY clause is applied. This means that the WHERE clause can only be used with columns from the SELECT list or columns that are part of the table being queried, while the HAVING clause can be used with columns from the SELECT list or columns that are part of an aggregate function. 2. The WHERE clause can be used with any SELECT, UPDATE, or DELETE statement, while the HAVING clause can only be used with a SELECT statement with the GROUP BY clause to group the result set based on one or more columns. The GROUP BY clause is used in conjunction with aggregate functions (such as SUM, COUNT, AVG, MAX, MIN) to group the result set based on one or more columns.
- WHERE子句用于在GROUP BY子句应用之前过滤行,而HAVING子句用于在GROUP BY子句应用之后过滤行。这意味着WHERE子句只能用于SELECT列表中的列或所查询表中的列,而HAVING子句可以用于SELECT列表中的列或聚合函数中的列。2. WHERE子句可用于任何SELECT、UPDATE或DELETE语句,而HAVING子句只能用于带有GROUP BY子句的SELECT语句,以根据一个或多个列对结果集进行分组。GROUP BY子句与聚合函数(如SUM、COUNT、AVG、MAX、MIN)结合使用,以根据一个或多个列对结果集进行分组。
For example, consider the following table "sales" with columns "product", "region", and "sales_amount":
例如,考虑以下带有“product”、“region”和“sales_amount”列的表“sales”:
| product | region | sales_amount |
|---|---|---|
| ProductA | North | 1000 |
| ProductA | South | 2000 |
| ProductB | North | 1500 |
| ProductB | South | 2500 |
| ProductC | North | 1200 |
| ProductC | South | 1800 |
| product | region | sales_amount |
|---|---|---|
| ProductA | North | 1000 |
| ProductA | South | 2000 |
| ProductB | North | 1500 |
| ProductB | South | 2500 |
| ProductC | North | 1200 |
| ProductC | South | 1800 |
GROUP BY:
GROUP BY:
If you want to know the total sales amount for each product, you can use the following query:
如果您想了解每个产品的总销售额,可以使用以下查询:
SELECT product, SUM(sales_amount) as total_sales FROM sales GROUP BY product;
SELECT product, SUM(sales_amount) as total_sales FROM sales GROUP BY product;
This will give you the following result set:
这将为您提供以下结果集:
| product | total_sales |
|---|---|
| ProductA | 3000 |
| ProductB | 4000 |
| ProductC | 3000 |
| product | total_sales |
|---|---|
| ProductA | 3000 |
| ProductB | 4000 |
| ProductC | 3000 |
HAVING:
HAVING:
If you want to know the total sales amount for each product where the sales amount is more than 3000 then the following query can be used -
如果您想了解每个产品中销售额超过3000的总销售额,则可以使用以下查询 -
SELECT product, SUM(sales_amount) as total_sales FROM sales GROUP BY product HAVING sales_amount > 3000;
SELECT product, SUM(sales_amount) as total_sales FROM sales GROUP BY product HAVING sales_amount > 3000;
This will give you the following result set:
这将为您提供以下结果集:
| product 产品 | total_sales 总销售额 |
|---|---|
| ProductB 产品B | 4000 |
Note that the result set is grouped by the "product" column, and the total sales amount is calculated using the SUM function.
请注意,结果集按“产品”列分组,总销售额使用SUM函数计算。
WHERE:
WHERE:
Suppose we want to find the products which are located in North Region and their sales amount >= 1200, then the following query can be used -
假设我们要查找位于北部地区且销售额>=1200的产品,则可以使用以下查询:
SELECT product, sales_amount FROM sales WHERE region = "North" AND sales_amount >= 1200;
SELECT product, sales_amount FROM sales WHERE region = "North" AND sales_amount >= 1200;
This will give you the following result set:
这将为您提供以下结果集:
| product 产品 | sales_amount 销售额 |
|---|---|
| ProductB 产品B | 1500 |
| ProductC 产品C | 1200 |
821. Write a query to get the 3rd largest salary from a table?
编写一个查询以从表中获取第三高的薪资?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6f58d557c902bc8697 | 官方: 否 | 付费: 否
答案:
Here is an example of a query that can be used to get the 3rd largest salary from a table in SQL:
以下是一个示例,展示了如何使用SQL从表中获取第三高的薪资:
SELECT salary FROM employees WHERE salary IN (SELECT DISTINCT salary FROM employees ORDER BY salary DESC LIMIT 3) ORDER BY salary ASC LIMIT 1;
SELECT salary FROM employees WHERE salary IN (SELECT DISTINCT salary FROM employees ORDER BY salary DESC LIMIT 3) ORDER BY salary ASC LIMIT 1;
This query first selects the distinct salaries from the employee's table and orders them in descending order. It then selects the top 3 salaries using the LIMIT clause. Finally, it selects the third salary from the list using the LIMIT 1 clause and orders the salary in ascending order.
此查询首先从员工表中选择不同的薪资,并按降序排列。然后使用LIMIT子句选择前3条薪资。最后,使用LIMIT 1子句从列表中选择第三个薪资,并按升序排列薪资。
Note that this query assumes that the salary column is of a numerical data type and that the table has at least 3 rows. If the table has fewer than 3 rows, the query will return an empty result set.
请注意,此查询假设薪资列是数值数据类型,并且表至少包含3行。如果表的行数少于3行,查询将返回空结果集。
822. Write queries to declare the primary key and foreign key for some table?
编写查询来为某个表声明主键和外键?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6f58d557c902bc869a | 官方: 否 | 付费: 否
答案:
A primary key is a column or set of columns (combined primary key) in a database table that uniquely identifies each record in the table. The primary key must be unique and not null, meaning it cannot have duplicate or null values. It is used to enforce data integrity and to establish relationships between tables. A table can have only one primary key.
主键是数据库表中一列或一组列(复合主键),用于唯一标识表中的每条记录。主键必须唯一且不为空,意味着它不能有重复或空值。它用于强制数据完整性并建立表之间的关系。一个表只能有一个主键。
A foreign key is a column or set of columns in a database table that refers to the primary key of another table. It establishes a link or relationship between two tables, allowing you to retrieve related data from multiple tables. The foreign key ensures referential integrity, which means that the data in the related tables are consistent and accurate. A table can have one or more foreign keys.
外键是数据库表中一列或一组列,引用另一个表的主键。它在两个表之间建立链接或关系,允许你从多个表中检索相关数据。外键确保引用完整性,这意味着相关表中的数据一致且准确。一个表可以有一个或多个外键。
To declare a primary key for a table in SQL, we should use the PRIMARY KEY keyword against the column you want to make as the primary key as shown in the syntax below:
要在SQL中为表声明主键,我们应对要设为主键的列使用PRIMARY KEY关键字,如下面的语法所示:
CREATE TABLE table_name (
CREATE TABLE table_name (
column1 datatype PRIMARY KEY,
column1 datatype PRIMARY KEY,
column2 datatype,
column2 datatype,
column3 datatype,
column3 datatype,
...
);
For example, to declare a primary key on the "id" column of the "employees" table, you can use the following query:
例如,要在“employees”表的“id”列上声明主键,可以使用以下查询:
CREATE TABLE employees (
CREATE TABLE employees (
id INT PRIMARY KEY,
id INT PRIMARY KEY,
name VARCHAR(50),
name VARCHAR(50),
salary DECIMAL(10,2) );
salary DECIMAL(10,2) );
To declare a foreign key for a table in SQL, you can use the following syntax using the REFERENCES keyword:
要在SQL中为表声明外键,可以使用带有REFERENCES关键字的以下语法:
CREATE TABLE table_name (
CREATE TABLE table_name (
column_name1 data_type REFERENCES parent_table (parent_column),
column_name1 data_type REFERENCES parent_table (parent_column),
column_name2 data_type,
column_name2 data_type,
...
);
For example, to declare a foreign key on the "department_id" column of the "employees" table that references the "id" column of the "departments" table, you can use the following query:
例如,要在“employees”表的“department_id”列上声明外键,该列引用“departments”表的“id”列,可以使用以下查询:
CREATE TABLE employees (
CREATE TABLE employees (
id INT PRIMARY KEY,
id INT PRIMARY KEY,
name VARCHAR(50),
name VARCHAR(50),
salary DECIMAL(10,2),
salary DECIMAL(10,2),
department_id INT REFERENCES departments (id) );
department_id INT REFERENCES departments (id) );
In summary, to declare a primary key for a table, you can use the PRIMARY KEY keyword, and to declare a foreign key for a table, you can use the REFERENCES keyword.
总之,要为表声明主键,可以使用PRIMARY KEY关键字;要为表声明外键,可以使用REFERENCES关键字。
823. What are pure virtual functions?
什么是纯虚函数?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6f58d557c902bc86a3 | 官方: 否 | 付费: 否
答案:
In C++, a pure virtual function is a virtual function that is declared in a base class but has no implementation provided in that class. This means that a subclass that inherits from the base class must provide an implementation for the pure virtual function, or the subclass will also become an abstract class. An abstract class is a class that cannot be instantiated on its own but must be subclassed to create an object.
在C++中,纯虚函数是在基类中声明但未在该类中提供实现的虚函数。这意味着继承自基类的子类必须为纯虚函数提供实现,否则该子类也将成为抽象类。抽象类是不能直接实例化的类,必须通过子类化来创建对象。
To declare a pure virtual function in C++, you can add the = 0 syntax to the end of the function declaration in the base class. For example:
要在C++中声明纯虚函数,可以在基类的函数声明末尾添加= 0语法。例如:
class Base {
class Base {
public:
public:
virtual void foo() = 0;
virtual void foo() = 0;
};
In this example, the foo() function is declared as a pure virtual function. Any subclass that inherits from Base must provide an implementation for foo() to be considered a concrete class.
在这个例子中,foo()函数被声明为纯虚函数。任何继承自Base的子类都必须为foo()提供实现,才能被视为具体类。
Pure virtual functions are used to define an interface that a set of related classes must implement. This is often used in object-oriented programming to achieve polymorphism, where a single function can be called on different objects of different classes, as long as they implement the same interface.
纯虚函数用于定义一组相关类必须实现的接口。这在面向对象编程中常用于实现多态性,即只要不同类的对象实现相同的接口,就可以在它们上调用同一个函数。
It is important to note that a class that contains at least one pure virtual function is an abstract class, and cannot be instantiated on its own. Instead, it must be subclassed to create a concrete class that provides an implementation for all pure virtual functions.
需要注意的是,包含至少一个纯虚函数的类是抽象类,不能直接实例化。相反,它必须被子类化,以创建一个为所有纯虚函数提供实现的具体类。
TCS Digital Interview Preparation
824. Does TCS Digital have a Negative Marking?
TCS Digital是否有负向标记?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6f58d557c902bc86e4 | 官方: 否 | 付费: 否
答案:
It is not uncommon for companies to include negative markings in their recruitment process, including TCS Digital. Negative marking means that incorrect answers on a test or exam will result in a deduction of points. The purpose of negative marking is to encourage accuracy and discourage guessing.
公司在其招聘过程中包含负向标记并不罕见,包括TCS Digital。负向标记意味着测试或考试中的错误答案将导致扣分。负向标记的目的是鼓励准确性并抑制猜测。
However, it is important to note that the specific recruitment process and policies of TCS Digital may vary, and it is always a good idea to confirm the details of the recruitment process with the company directly.
然而,需要注意的是,TCS Digital的具体招聘流程和政策可能有所不同,最好直接与公司确认招聘流程的详细信息。
825. Is the TCS Digital interview tough?
TCS Digital 的面试难吗?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6f58d557c902bc86e7 | 官方: 否 | 付费: 否
答案:
The difficulty level of an interview can vary depending on a variety of factors, such as the role you are applying for, your level of experience, and the specific skills and knowledge required for the position.
面试的难度级别可能因多种因素而异,例如你申请的职位、你的经验水平,以及该职位所需的特定技能和知识。
In general, TCS Digital is known for its rigorous recruitment process, which typically includes a written test and multiple rounds of interviews. The interviews may include both technical and behavioral questions and may be conducted by a panel of interviewers.
总的来说,TCS Digital 以其严格的招聘流程而闻名,通常包括笔试和多轮面试。面试可能包括技术问题和行为问题,并可能由面试官小组进行。
Overall, it is likely that the TCS Digital interview process will be challenging, but with proper preparation and a strong understanding of the skills and knowledge required for the role, it is possible to succeed. It is always a good idea to do your research on the company and the specific role you are applying for and to practice answering common interview questions to increase your chances of success.
总体而言,TCS Digital 的面试过程很可能会具有挑战性,但通过充分准备和对职位所需技能与知识的深入理解,成功是有可能的。始终建议你研究公司和所申请的具体职位,并练习回答常见面试问题,以增加成功的机会。
826. How to apply for TCS Digital?
如何申请 TCS Digital?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6f58d557c902bc86ea | 官方: 否 | 付费: 否
答案:
To apply for a job at TCS Digital, you can visit the TCS Digital career page ( https://www.tcs.com/careers ) and browse the available job openings. You can filter the job openings by location, job category, and other criteria to find positions that match your interests and qualifications.
要申请 TCS Digital 的职位,你可以访问 TCS Digital 的招聘页面( https://www.tcs.com/careers ),并浏览现有的职位空缺。你可以按地点、职位类别和其他标准筛选职位空缺,以找到符合你兴趣和资质的职位。
To apply for a specific job, click on the job title and read the job description and requirements carefully. If you meet the requirements and are interested in the position, click on the "Apply" button and follow the prompts to create a profile and submit your application.
要申请特定职位,请点击职位名称,并仔细阅读职位描述和要求。如果你符合要求并对该职位感兴趣,请点击“申请”按钮,并按照提示创建个人资料并提交申请。
You will be required to upload your resume and cover letter as part of the application process. Make sure that your resume and cover letter are well-written and highlight your relevant skills and experience. You may also be asked to provide additional information or documents, such as references or transcripts.
作为申请流程的一部分,你需要上传简历和求职信。确保你的简历和求职信书写良好,并突出你的相关技能和经验。你可能还会被要求提供额外信息或文件,例如推荐人或成绩单。
After you have submitted your application, you may be invited to complete a written test or participate in an interview as part of the recruitment process. If you are selected for the next stage of the process, you will be contacted by a TCS Digital representative.
提交申请后,你可能会被邀请参加笔试或作为招聘流程一部分的面试。如果你被选中进入下一阶段,TCS Digital 的代表将与你联系。
Overall, the application process for TCS Digital is fairly straightforward. By taking the time to carefully review the job description and requirements, and preparing a strong application, you can increase your chances of success.
总体而言,TCS Digital 的申请流程相当直接。通过花时间仔细审查职位描述和要求,并准备一份强有力的申请,你可以增加成功的机会。
827. What is the cutoff of TCS Digital?
TCS Digital 的分数线是多少?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6f58d557c902bc86ed | 官方: 否 | 付费: 否
答案:
The cutoff for the TCS Digital recruitment process is 90%. Candidates who score 90% or above on the written test will qualify for the TCS Digital Technical Interview Round. Those who score below 90% will qualify for the TCS Ninja Technical Interview Round.
TCS Digital 招聘流程的分数线为 90%。在笔试中得分达到或超过 90% 的候选人将有资格进入 TCS Digital 技术面试轮。得分低于 90% 的候选人将有资格进入 TCS Ninja 技术面试轮。
828. What is the salary of TCS Digital?
TCS Digital 的薪资是多少?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6f58d557c902bc86f0 | 官方: 否 | 付费: 否
答案:
The salary at TCS Digital can vary depending on a variety of factors, such as the role you are hired for, your level of experience, your location, and the specific needs and requirements of the company.
TCS Digital 的薪资可能因多种因素而异,例如你被聘用的职位、你的经验水平、你的地点,以及公司的具体需求和条件。
In India, the average salary for a software engineer at TCS Digital is INR 650,000 per year , according to data from Glassdoor. This is based on data from 8,913 salaries submitted anonymously to Glassdoor by TCS Digital employees.
在印度,根据 Glassdoor 的数据,TCS Digital 软件工程师的平均年薪为 65 万印度卢比。这一数据基于 TCS Digital 员工匿名提交给 Glassdoor 的 8,913 份薪资数据。
It is important to note that these figures are just estimates, and the actual salary you receive at TCS Digital may be higher or lower depending on your specific role and qualifications. It is always a good idea to confirm the salary and benefits offered by the company directly before accepting a job offer.
需要注意的是,这些数字仅为估算值,你在 TCS Digital 实际获得的薪资可能根据你的具体职位和资质而更高或更低。在接受工作邀请前,始终建议直接向公司确认所提供的薪资和福利。
829. How long is the TCS Digital Interview?
TCS Digital面试持续多长时间?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-digital, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c6f58d557c902bc86f3 | 官方: 否 | 付费: 否
答案:
The length of the interview process at TCS Digital can vary depending on the specific role you are applying for and the needs of the company. The interview process for software engineers at TCS Digital typically includes a written test and multiple rounds of interviews, which may include technical and behavioral questions.
TCS Digital面试过程的时长可能因您申请的特定职位和公司需求而有所不同。TCS Digital软件工程师的面试过程通常包括笔试和多轮面试,可能涉及技术问题和行为问题。
It is not uncommon for the TCS Digital interview process to take several weeks or even months to complete. The specific length of the interview process will depend on the availability of the candidates and the interviewers, as well as the specific needs of the company.
TCS Digital面试过程耗时数周甚至数月完成的情况并不少见。面试过程的具体时长将取决于候选人和面试官的可用时间,以及公司的具体需求。
It is always a good idea to confirm the details of the interview process with the company directly or to ask about the estimated length of the process during the interview. This will help you better plan your schedule and prepare for the interview process.
建议直接向公司确认面试过程的细节,或在面试期间询问预计的时长,这将有助于您更好地规划日程并为面试过程做好准备。
830. What are the competitors of TCS globally and in India?
TCS在全球和印度的竞争对手有哪些?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc870d | 官方: 否 | 付费: 否
答案:
Keeping an eye on the current market will definitely help. The key to an impressive answer is sound research, and this also shows the interviewer that you are concerned about the interview as well as the job. For example, Wipro, Mahindra Satyam, Tech Mahindra, Infosys, HCL Tech, Mphasis, etc.
关注当前市场肯定会有帮助。给人留下深刻印象的关键在于充分调研,这也向面试官表明您关心面试和工作。例如,Wipro、Mahindra Satyam、Tech Mahindra、Infosys、HCL Tech、Mphasis等。
831. Who is the founder of TCS?
TCS的创始人是谁?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc8710 | 官方: 否 | 付费: 否
答案:
TATA Group was founded by Jamsetji Nusserwanji Tata in 1869 as a private organization. Jehangir Ratanji Dadabhoy Tata (JRD Tata) was the driving force behind the expansion of this group into TCS, which was established in 1968. At the present time, Mr Natarajan Chandrasekaran is the Chairman of the TCS.
TATA集团由Jamsetji Nusserwanji Tata于1869年作为私营组织创立。Jehangir Ratanji Dadabhoy Tata(JRD Tata)是该集团扩展为TCS的推动力量,TCS成立于1968年。目前,Natarajan Chandrasekaran先生是TCS的董事长。
832. How do you envision yourself five years from now?
你设想五年后的自己会是什么样子?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc8717 | 官方: 否 | 付费: 否
答案:
Often, employers will ask this question to determine whether you are committed to the company and if you have future goals aligned with the position. Employers want to know that the job will satisfy you, that you'll work hard, and that you'll stay with the company for many years. Although it's not possible to know entirely envision yourself five years from now, being prepared to answer this question will help put you on the right track and help make the interview more productive overall.
通常,雇主会问这个问题来判断你是否忠于公司,以及你是否拥有与职位相符的未来目标。雇主希望知道这份工作能让你满意,你会努力工作,并会在公司长期留任。虽然不可能完全预知五年后的自己,但准备好回答这个问题有助于你走上正确的轨道,并让整个面试更加高效。
Tips - Take a moment to consider where you'd like to be in five years of your career. If you prepare yourself for this ahead of time, you will be able to talk about the question confidently.
提示 - 花点时间考虑一下五年后你希望自己的职业生涯处于什么位置。如果你提前做好准备,就能自信地谈论这个问题。
- Speak with a slight sense of ambition. It may seem simplistic, but it's true: for an interview, all you need to do is say something a little challenging, but still reasonable.
- Finally, ensure that you can explain how the job that you are interviewing for fits within the context of your five-year career objective. Otherwise, they may wonder whether you really want the job and if you are capable of staying for a longer period of time.
833. Who inspired you to be an engineer?
谁激励你成为了一名工程师?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc871a | 官方: 否 | 付费: 否
答案:
Typically, employers ask this question in order to better understand your motivations for applying for the position. Additionally, employers may utilize this question to learn how you interact with those around you. This question can help you articulate your desire to obtain the job you are interviewing for, as well as your values.
通常,雇主问这个问题是为了更好地了解你申请该职位的动机。此外,雇主可能会利用这个问题来了解你如何与周围的人互动。这个问题可以帮助你清晰表达你获得面试职位的愿望,以及你的价值观。
Tips - Do not go into too much detail.
提示 - 不要深入细节。
- Consider a few industry leaders who have achieved something extraordinary in their lives. You may choose someone with the same values as your own. You may list one person whose life story you know and holds the same values, mentioning his accomplishments.
- Include some of his quotes or values that he believes contributed to his extraordinary success.
- Mention the traits and qualities you possess which will be valuable to your success in the position you are interviewing for. Incorporate those values and behaviours into how they affect your professional life.
834. What will you do if you are rejected today?
如果今天你被拒绝了,你会怎么做?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc871d | 官方: 否 | 付费: 否
答案:
This does not mean that they are rejecting you, so do not let your discouragement get the better of you. Candidates are often asked this question to discern whether or not they will get frustrated and depressed after rejection, or if they will learn from their mistakes and reapply. Also, they may want to know if you have applied to any other companies or if you are determined to join TCS. You will not be rejected either way, as long as your answer is positive.
这并不意味着他们正在拒绝你,所以不要让沮丧感左右你。候选人常被问到这个问题,以判断他们在被拒绝后是否会感到挫败或沮丧,还是会从错误中学习并重新申请。此外,他们可能想知道你是否申请了其他公司,或者你是否决心加入TCS。只要你的回答是积极的,无论哪种情况你都不会被拒绝。
Tips - An interviewer is not concerned with how many mistakes you have made, but rather how you have learned from them and incorporated them into your next attempt. Let the interviewer know you intend to improve your skills and will try again with better skills.
提示 - 面试官并不关心你犯了多少错误,而是关心你如何从错误中学习并将其融入下一次尝试。让面试官知道你打算提升技能,并以更好的技能再次尝试。
- Don't appear disappointed, but be honest about your feelings. Say that you will see rejection as a challenge and will overcome it.
835. Are you interested in changing your domain? If yes, why?
你有兴趣更换领域吗?如果有,为什么?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc8720 | 官方: 否 | 付费: 否
答案:
Typically, this question is more pertinent for individuals who are switching careers between two different domains, such as engineers moving from other domains to the field of Data Science or Management. The interviewer will want to make sure you aren't leaving your job due to poor performance, a difficult working relationship, or a dislike for your boss. Answering questions about why you are switching domains is a great means of providing reassurance that you are leaving for the right reasons, not just to get out of a work situation.
通常,这个问题对于在两个不同领域之间转换职业的人更为相关,例如从其他领域转行到数据科学或管理领域的工程师。面试官会想确保你不是因为绩效不佳、工作关系紧张或不喜欢上司而离职。回答关于为何转换领域的问题,是提供保证你出于正确理由离职的好方法,而不仅仅是摆脱工作环境。
Tips - Focus on the positive reasons why you wish to work for the organization.
提示 - 专注于你希望为该组织工作的积极原因。
- Cite factors like the company culture, work environment, and employer that match your interests and skills.
- Putting your potential employer at the forefront of the conversation redirects the conversation from your past work experience to your potential. It also shows the hiring manager that you've done your research before the interview.
- Do not discuss the negative aspects of your previous employment. The only exception would be if your industry suffered a downturn and faced layoffs, reduced opportunities, etc.
836. What has been TCS's most recent accomplishment?
TCS最近取得的最大成就是什么?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc8723 | 官方: 否 | 付费: 否
答案:
The Brand Finance 2022 Rankings show Tata Consultancy Services (TCS) brand value increased by $1.8 billion over the past year, moving into the top two IT services brands globally. TCS's strong financials, customer equity, and investments in the brand are contributing to the rise in brand value.
《Brand Finance 2022》排名显示,塔塔咨询服务公司(TCS)的品牌价值在过去一年增长了18亿美元,跻身全球IT服务品牌前两名。TCS强劲的财务表现、客户资产以及对品牌的投入,都促进了品牌价值的提升。
837. What is your previous work experience and role?
你之前的工作经验和职责是什么?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc8726 | 官方: 否 | 付费: 否
答案:
The job you're applying for will come with its own set of responsibilities that you'll be expected to carry out, so your prior work experience can assist your interviewer in gauging whether you are suitable for the position. Though your work history can be seen on your application, your ability to summarise it and relate it to the position shows that you have considered the employer's expectations.
你申请的职位会附带一系列你需履行的职责,因此你的先前工作经验能帮助面试官评估你是否适合该职位。虽然你的工作经历在申请中可见,但你能否总结并联系到该职位,显示出你对雇主的期望有所考虑。
Tips - Get familiar with the position's responsibilities in order to best showcase your abilities.
提示:熟悉该职位的职责,以最好地展示你的能力。
- Moreover, you can tie your experience directly to the position's responsibilities. Assess your application materials to determine which of your past experiences correspond to those described in the job description.
- Rephrase your resume items to match the new position's requirements. If you practice, you can avoid omitting relevant information, remain concise, and sound conversational.
838. How well do you know TCS as a company?
你对TCS这家公司有多了解?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc8729 | 官方: 否 | 付费: 否
答案:
Employers can afford to be picky when securing top talent in a competitive job market. Rather than simply choosing candidates with experience or high education, the company prefers to hire individuals passionate about the organization and who apply to a position for a specific reason. Obviously, if you spent time researching and preparing for the interview, you are likely to do the same with the day-to-day activities and responsibilities associated with the position. Candidates who are well prepared are likely to be ambitious and committed to their professional development.
在竞争激烈的就业市场中,雇主在吸引顶尖人才时可以挑剔。他们不只选择有经验或高学历的候选人,更倾向于雇用在特定原因下对组织充满热情并申请职位的人。显然,如果你花时间研究和准备了面试,你很可能也会对与职位相关的日常活动和职责做同样的准备。准备充分的候选人通常雄心勃勃,并致力于自己的职业发展。
Tips - Always do some research on the company for which you are interviewing. Study the organization, discover what it offers, how big or small the company is, why a position is needed, what challenges the company is facing, and what the hiring manager's role is.
提示:务必对要面试的公司进行研究。研究组织,了解它提供什么,公司规模大小,为何需要该职位,公司面临什么挑战,以及招聘经理的职责是什么。
- Be enthusiastic and show your interest. Communicate your desire to join the organisation in an authentic and genuine way.
- Talk about the company's services, landmarks in its history, and aspects of its mission and values that are relevant to your career goals.
839. Would you mind working night shifts and relocating?
你介意上夜班和搬家吗?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc872c | 官方: 否 | 付费: 否
答案:
In a nutshell, the answer depends entirely on you. Simply be honest with yourself. The question is intended to determine whether you can make it to the office if you do not live nearby and if you are willing to work a night shift. TCS has centres across the various countries and in some states, there is more than one centre. Thus, joining it does not pose a problem at all. Although some offices do have specific positions that are for one type of job profile. You can answer the question depending on your situation.
简而言之,答案完全取决于你自己。只需对自己诚实。该问题旨在判断如果你不住在附近,能否到达办公室,以及是否愿意上夜班。TCS在多个国家设有中心,在某些州有多个中心,因此加入它完全不成问题。虽然有些办公室确实有特定职位针对单一工作类型。你可以根据自身情况回答这个问题。
840. What makes you the best candidate for this position? Or Why should we hire you?
是什么让你成为这个职位的最佳候选人?或者为什么我们应该雇佣你?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc872f | 官方: 否 | 付费: 否
答案:
Interviewers ask this question to figure out whether you are aware of how your skills, experience, and education are aligned with the job's responsibilities. Applicants should be prepared to communicate why they are the right fit for the position and the company, highlighting specific accomplishments and characteristics that will make them an asset to the company. When answering such a question, you should try to convince the hiring manager that you are a unique candidate who stands out from the rest.
面试官提出这个问题是为了了解你是否知道自己的技能、经验和教育如何与职位职责相匹配。应聘者应准备好沟通为什么他们是该职位和公司的合适人选,突出具体成就和特点,使其成为公司的资产。回答此类问题时,你应尽量说服招聘经理,你是独一无二、脱颖而出的人选。
Tips - By analyzing your experience and job requirements, you can learn more about your unique strengths. If possible, express enthusiasm and provide evidence to back up your answers.
提示:通过分析你的经验和职位要求,你可以更多地了解自己的独特优势。如有可能,表达热情并提供证据支持你的回答。
- Despite your experience not being directly relevant, you can still find some value in it. Highlight your teamwork skills, leadership roles, computer skills, and independent research activities that have proven useful to the job at hand, even if you lack direct experience.
- Check the job description and do some research on the company. Outline how your skills and qualifications align with the daily responsibilities of the position in addition to the mission and goals of the company as a whole.
- Practice answering the question naturally and confidently. Your answer should not sound rehearsed and forced, but you need to know in advance how you will respond.
841. What's most important to you? Work or Money?
对你来说最重要的是什么?工作还是金钱?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc8732 | 官方: 否 | 付费: 否
答案:
Interviewers want to know how you prioritize money in your decisions, both for accepting the position and for future consideration regarding retention. Answering the right way can make your passions seem like the best fit for the job. Money should not be dismissed out of hand, but neither should it be the top priority. The best approach is to keep things in perspective. Obviously, money is important - no one works for free, after all - but the satisfaction you derive from your work, your coworkers, and your boss ranks higher. You will soon learn in your career that growth and advancement opportunities are more important in the long run.
面试官想知道你在决策中如何优先考虑金钱,既在是否接受职位时,也在未来关于留任的考虑中。以正确方式回答,能让你的热情看起来最适合该工作。金钱不应被一笔带过,也不应是首要考虑。最佳方法是保持平衡视角。显然,金钱很重要——毕竟没人白干活——但你从工作、同事和上司获得的满足感排得更靠前。你在职业生涯中很快会学到,长期来看,成长和晋升机会更为重要。
Tips - Hiring managers tend to prefer candidates who place a higher priority on their work than their paycheck. Additionally, they are aware that money is an important aspect of their lives as well. Combining these two motivations can help you to give your best answer.
提示:招聘经理倾向于偏好将工作放在比薪水更高优先级的候选人。此外,他们也知道金钱在生活中是重要方面。结合这两种动机,有助于你给出最佳回答。
- Make sure you point out personal interests and goals that align with the company's mission statement, as well as your desire to earn a reasonable wage.
- Never tell an interviewer that you are more concerned about money than work. It implies that you may leave the company if a more lucrative opportunity emerges.
842. Why do you wish to work for TCS and not any other company?
你为什么希望为TCS工作,而不是其他公司?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc8735 | 官方: 否 | 付费: 否
答案:
TCS is a leading company in the world with high salaries, professional growth, and job security. Consequently, if you are interested in working for the company, it is a good decision. As long as these are the only reasons, then it's not what TCS is looking for. It goes without saying that TCS wants you to grow while making your most valuable contribution to the company's success.
TCS是一家世界领先的公司,提供高薪、职业发展和工作保障。因此,如果你有兴趣为这家公司工作,这是一个好决定。但只要这些是唯一的原因,那就不符合TCS的期望。不言而喻,TCS希望你成长,同时为公司成功做出最有价值的贡献。
Tips - Discover various facts about the company, its business, its people, its culture, and more. For this, one needs to do a great deal of research. Your research ultimately provides you with insight into how to respond to the interview questions and why you are interested in working at TCS.
提示 - 发现关于公司的各种事实,包括其业务、人员、文化等。为此,需要进行大量研究。你的研究最终会让你洞悉如何回答面试问题,以及你为什么有兴趣在TCS工作。
- Consider what you could offer and how you can make a difference.
- Follow the company's social media accounts, especially for relevant industry news and customer feedback.
- Analyze your career goals and core values to see whether they are similar to the companies.
843. Do you work well as part of a team? OR Have you ever managed a large team or group of people effectively? OR Are you a team player?
你作为团队一员工作表现好吗?或者你曾经有效管理过大型团队或一群人吗?或者你是团队合作者吗?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc8738 | 官方: 否 | 付费: 否
答案:
Typically, when hiring managers ask this question, they hope to gauge your skills in collaboration, communication, and the ability to work well with others. Essentially, they would like to see if you would be a suitable candidate for the position and to see if you adhere to the company's values and culture. If possible, in conjunction with providing a clear yes or no response, you should also provide anecdotes or examples of how your answer applies to the case.
通常,招聘经理问这个问题时,希望评估你的协作、沟通和与他人良好合作的能力。本质上,他们想看看你是否适合该职位,并看你是否遵循公司的价值观和文化。如果可能,除了给出明确的“是”或“否”回答外,还应提供轶事或例子来说明你的回答如何适用。
Tips - Find out what skills, duties, and qualifications are relevant to the role you're applying for, including any mention of collaboration, teamwork, or communication.
提示 - 找出与你申请的职位相关的技能、职责和资格,包括任何提到协作、团队合作或沟通的内容。
- Choose a few examples from your professional experience that demonstrate your ability to work as a team player. It is particularly beneficial to highlight your role in the team effort, your contribution, and what your team achieved.
- Besides teamwork, it is a good idea to emphasize other skills, such as adaptability, communication skills, collaboration, interpersonal abilities, observation abilities, active listening abilities, etc.
- When you respond that you prefer to work alone, emphasize how your singular efforts could assist the team in achieving its objectives.
- If you lack professional experience, you can draw upon extracurricular activities, volunteer experience, and school projects if you are in a space that needs to be filled.
844. How do you stay abreast of technological developments?
你如何跟上技术发展?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc873b | 官方: 否 | 付费: 否
答案:
Keeping up with technology can make you a more effective employee, regardless of whether you work in coding, manufacturing products, or reaching out to customers. Potential employers will assess your 'fit' by determining whether you are passionate about the industry you are applying to. By freely discussing how you stay on top of industry trends, you will show the interviewer that you are still passionate about your field.
跟上技术发展可以让你成为更有效的员工,无论你从事编码、制造产品还是与客户沟通。潜在雇主会通过判断你对你申请的行业是否充满热情来评估你的“匹配度”。自由地讨论你如何跟上行业趋势,会向面试官展示你仍然对领域充满热情。
Tips - Consider reading technology-oriented publications and technology news sites online for a balanced perspective.
提示 - 考虑阅读以技术为主题的出版物和在线技术新闻网站,以获得平衡视角。
- Conferences provide an excellent opportunity to discover emerging technology that is relevant to your industry. Listen to industry experts, participate in seminars, and discuss products with vendors.
- Arrange periodic meetings with coworkers, colleagues from other departments, and industry professionals to discuss technology.
- Startups are often hubs for innovation. Follow start-up news feeds and connect with their employees to keep abreast of new technological trends in your industry.
- See how other departments or industries are using technology. Seeing what other successful companies are doing with technology can give you ideas for incorporating it into your company.
- When evaluating new technologies, consider whether they can meet your company's current or future needs. In the workplace, even the most innovative product may not be necessary unless it serves a purpose.
845. In what ways did you prepare for this interview, and did you receive any help?
你是如何为这次面试做准备的,并且你得到过任何帮助吗?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc873e | 官方: 否 | 付费: 否
答案:
As the interviewer asks these questions, he is attempting to assess whether you are an individual who takes initiative. When you describe the steps you took to prepare for your meeting, interviewers can see that you are highly motivated to obtain the position. Also, your response will indicate that you will likely be a thorough and diligent employee. Although you may not have had time to prepare for this meeting, or it was a last-minute appointment, it is likely you still took the time to investigate the company online or read the job description. You can briefly outline the ways in which you prepared for the interview.
当面试官问这些问题时,他在试图评估你是否有主动性的人。当你描述为会议做准备所采取的步骤时,面试官可以看到你非常有动力获得这个职位。此外,你的回答会表明你可能会是一个彻底且勤奋的员工。尽管你可能没有时间准备这次会议,或者这是临时安排的约会,但你很可能还是花时间在线调查了公司或阅读了职位描述。你可以简要概述你为面试做准备的方式。
846. What do you expect from the company?
你对公司有什么期望?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc8741 | 官方: 否 | 付费: 否
答案:
A prospective employer may be looking for several factors when asking you what your job expectations are. In asking you about your job expectations, employers are really looking for information about how you met your expectations in your previous role, or what you expect from us as an employer in terms of work environment, culture, and growth, as well as your expectations related to this position. The information you share will be used to determine if the role you're applying for is a good match for your career goals and qualifications.
潜在雇主在问你工作期望时,可能寻求几个因素。在询问你的工作期望时,雇主实际上是在寻找信息,关于你如何满足先前角色中的期望,或你对我们的工作环境、文化、成长方面的期望,以及与此职位相关的期望。你分享的信息将用于确定你申请的职位是否与你的职业目标和资格良好匹配。
Tips: - Initially, it is important to research and learn what the job entails and determine if you are capable or interested in doing it. Explain to the interviewer what you believe the job expects of you.
提示 - 首先,重要的是研究和了解工作内容,并确定你是否能胜任或有兴趣做。向面试官解释你认为工作对你的期望是什么。
- Ideally, we would like to obtain a position in which we could utilize our existing skills.
- Hence, you should let the interviewer know how your current skills are relevant to this job. Indicate which of your skills are relevant to this position.
- Upbeat responses to prior experiences show the interviewer you have the ability to find the positives despite tough situations and ensure them that you will not speak negatively of the company in the future.
- The intent of your reply should not be to ramble on for too long, but to highlight one specific area and outline your expectations there.
847. Is there anything you would like to ask me?
你有什么想问我的吗?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-hr, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7058d557c902bc8744 | 官方: 否 | 付费: 否
答案:
HR professionals will often ask this question in an effort to determine if the candidate is truly interested in learning more. It's better to ask a question rather than politely demur, otherwise you can give an impression that you are not engaged with the conversation, or that you are not enthusiastic enough about the job to ask for more information.
人力资源专业人员通常会问这个问题,以确定候选人是否真正有兴趣了解更多。最好问一个问题,而不是礼貌地拒绝,否则你可能会给人留下你不太投入对话,或对工作不够热情以询问更多信息的印象。
Tips - It is a good idea to prepare a list of a few questions to ask during the interview.
提示 - 在面试过程中准备一份要提问的问题清单是个好主意。
- Questions should demonstrate your interest in the interview and your understanding of the company's objectives and priorities. Reflect on previous moments in the interview or the news of the company or market.
- Ask the hiring manager about something that requires more detail than a simple 'yes' or 'no' answer.
In asking HR questions about a role or company, it is important to avoid information such as the hiring manager's personal life, non-work activities, easily accessible information, or salary questions.
Conclusion结论
A good work-life balance is a key aspect of maintaining career advancement. TCS is a brand that people believe can facilitate this. TCS is an excellent place to start your career if you are seeking an organization to develop your skills and advance your career. The workplace provides a good ambience conducive to both company and individual advancement. The TCS recruitment process begins with a written test, followed by a technical interview, and finally, the HR round, which is an easy, yet extremely crucial round.
良好的工作与生活平衡是维持职业发展的关键方面。TCS是一个人们相信能够促进这一点的品牌。如果你正在寻找一个能发展技能和推进职业发展的组织,TCS是一个绝佳的起点。工作场所提供了有利于公司和员工共同进步的良好氛围。TCS招聘流程始于笔试,接着是技术面试,最后是人力资源环节,这一环节虽然简单,但至关重要。
This article covers a number of frequently asked TCS HR interview questions and answers, as well as a few tips that can help you craft persuasive responses in your interview. TCS HR rounds test the candidate's character and traits, which helps to determine whether the candidate is suited to the TCS work culture. Although you may not be asked the exact same questions, knowing the answers to these questions will prepare you well for any HR questions you might come across. Most candidates mistakenly believe that they can simply breeze through the HR round of the interview without any preparation. It is important to strike a positive tone and maintain an air of self-confidence. Interviews can be long and tiresome, so don't forget to smile!
本文涵盖了许多常见的TCS人力资源面试问题及其答案,以及一些能帮助你在面试中构思有说服力回答的技巧。TCS人力资源环节测试候选人的性格和特质,这有助于确定候选人是否适合TCS的工作文化。虽然你可能不会被问到完全相同的问题,但了解这些问题的答案将让你为可能遇到的任何人力资源问题做好充分准备。大多数候选人错误地认为他们可以毫无准备地轻松通过面试的人力资源环节。重要的是要营造积极的语调并保持自信的姿态。面试可能漫长且令人疲惫,所以不要忘记微笑!
Useful Resources
有用资源
- Technical Interview Questions
- Coding Interview Questions
- Interview Resources
TCS HR Interview Preparation
848. Write a Program to print the Half Pyramid Number Pattern?
编写一个程序来打印半金字塔数字模式?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7258d557c902bc880f | 官方: 否 | 付费: 否
答案:
Pattern:
模式:
1
22
333
4444
55555
Code:
代码:
class PyramidPattern{
class PyramidPattern{
public static void main(String[] args) {
public static void main(String[] args) {
//to control how many rows we have to print
//控制我们需要打印的行数
int noOfRows=5;
int noOfRows=5;
for(int num=1;num<=noOfRows;++num){
for(int num=1;num<=noOfRows;++num){
for(int j=1;j<=num;++j){
for(int j=1;j<=num;++j){
System.out.print(num);
System.out.print(num);
}
System.out.println();
System.out.println();
}
}
}
We have used nested loops to print the pattern. The outer loop is used to control the no of rows we want to print and what number will be printed on each row. An inner loop is used to control the number of types that number will be printed. - Time Complexity: O(n^2)
我们使用了嵌套循环来打印该图案。外层循环用于控制要打印的行数以及每行打印的数字,内层循环用于控制该数字打印的次数。- 时间复杂度:O(n^2)
- Space Complexity: O(1)
849. Write a program to check if a number is prime or not?
编写一个程序,检查一个数字是否是素数?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7258d557c902bc8819 | 官方: 否 | 付费: 否
答案:
A number is said to be the prime number if it is divisible by itself or 1. If the number is divisible by any other number then it is not a prime number.
如果一个数字只能被自身或1整除,则称为素数。如果该数字能被任何其他数字整除,则它不是素数。
Code:
代码:
public class Main {
public class Main {
static boolean primeNumberChecker(int number){
static boolean primeNumberChecker(int number){
int i = 2;
int i = 2;
boolean flag = false;
boolean flag = false;
while (i <= number / 2) {
while (i <= number / 2) {
//Check if number is divisible by i
//检查数字是否能被i整除
if (number % i == 0) {
if (number % i == 0) {
//set flag to true and breakout of the loop
//设置标志为true并退出循环
flag = true;
flag = true;
break;
break;
}
i++;
i++;
}
if (!flag)
if (!flag)
return true;
返回 true;
else
else
return false;
返回 false;
}
public static void main(String[] args) {
public static void main(String[] args) {
int numberToCheck = 11;
整数 待检数字 = 11;
//Call the function and store the result
//调用函数并存储结果
boolean result = primeNumberChecker(numberToCheck);
布尔值 结果 = 素数检查器(待检数字);
//Check if result is true then number is prime
//检查结果是否为真,如果为真则数字是素数
if (result)
如果 (结果)
System.out.println(numberToCheck + " is a prime number.");
系统输出行(待检数字 + " 是一个素数。");
else
else
System.out.println(numberToCheck + " is not a prime number.");
系统输出行(待检数字 + " 不是一个素数。");
}
}
Take a boolean variable as and set it to by default false.
取一个布尔变量,并将其默认设置为假。
Start the loop from 2 because a number is always divisible by 1.
从2开始循环,因为数字总是能被1整除。
Now check if the number is divisible by any other number.
现在检查数字是否能被其他任何数字整除。
If the number is divisible by the other number then set the flag variable as true and break the loop.
如果数字能被其他数字整除,则将标记变量设为真并跳出循环。
Now check if a flag is true means the number is not a prime number. - Time Complexity: Loop is running only half times of number so the time complexity would be O(n).
现在检查一个标志是否为真,表示该数字不是质数。- 时间复杂度:循环只运行数字的一半次数,因此时间复杂度为 O(n)。
- Space Complexity: O(1)
850. Write a recursive function to print the factorial of a number?
编写一个递归函数来打印一个数字的阶乘?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7258d557c902bc881c | 官方: 否 | 付费: 否
答案:
The definition of a factor of a number n is the multiplication of all positive descending integers; the factor of n is represented by the symbol n!.
数字 n 的阶乘定义为所有正递减整数的乘积;n 的阶乘用符号 n! 表示。
Code:
代码:
public class Factorial{
public class Factorial{
static long factorial(int number){
static long factorial(int number){
//Base condition when recursive call will stop
//当递归调用停止时的基本条件
if(number==0 || number == 1)
if(number==0 || number == 1)
return 1;
return 1;
return number * factorial(number-1);
return number * factorial(number-1);
}
public static void main(String[] args) {
public static void main(String[] args) {
//Number to calculate factorial
//要计算阶乘的数字
int number = 10;
int number = 10;
System.out.println(factorial(number));
System.out.println(factorial(number));
}
}
- Time Complexity: Time complexity would be O(n).
- Space Complexity: In each recursive call, it uses stack internally so space complexity would be O(n).
851. Write a program to check if there exist a duplicate key in the array?
编写一个程序来检查数组中是否存在重复的键?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7258d557c902bc881f | 官方: 否 | 付费: 否
答案:
import java.util.*;
import java.util.*;
class Duplicate {
class Duplicate {
public static boolean checkDuplicate(int[] arr) {
public static boolean checkDuplicate(int[] arr) {
// create a hashmap to store the occurrence of the number
// 创建一个哈希映射来存储数字的出现次数
Map<Integer,Integer> container = new HashMap<>();
Map<Integer,Integer> container = new HashMap<>();
//Loop through the array
//循环遍历数组
for(int i=0;i<arr.length;i++){
for(int i=0;i<arr.length;i++){
//Check if number already exist in the hashmap
//检查数字是否已存在于哈希映射中
if(container.containsKey(arr[i])){
if(container.containsKey(arr[i])){
return true;
返回 true;
}
else
else
container.put(arr[i],1);
container.put(arr[i],1);
}
return false;
返回 false;
}
public static void main(String[] args){
public static void main(String[] args){
//Input array
//输入数组
int []arr = {10,20,30,40,10};
int []arr = {10,20,30,40,10};
System.out.println(checkDuplicate(arr));
System.out.println(checkDuplicate(arr));
}
}
Output:
输出:
true
true
To solve this problem we will use the HashMap. First, we will check if the key exists in the map or not if it exists means there is a duplicate key in the array. If the key does not exist in the array then we will put the key in the array with value 1. Keep doing this till the last element of the array.
为了解决这个问题,我们将使用HashMap。首先,我们会检查键是否存在于映射中,如果存在,则意味着数组中有重复的键。如果键不存在于数组中,那么我们会将该键放入数组,值为1。一直这样做直到数组的最后一个元素。
If key exists return false otherwise return true. - Time Complexity: Time complexity would be O(n).
如果键存在则返回false,否则返回true。 - 时间复杂度:时间复杂度为O(n)。
- Space Complexity: We are using additional space to keep a count of the occurrence of each number so space complexity would be O(n).
852. Write a program to find the missing element in an array?
编写一个程序来查找数组中的缺失元素?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7258d557c902bc882a | 官方: 否 | 付费: 否
答案:
We are given an array ranging from 1 to N-1. One of the number is missing from the array the task is to find that number. There is no repeating number in the array.
我们给定一个范围从1到N-1的数组。数组中缺少了一个数字,任务是找到那个数字。数组中没有重复的数字。
class MissingNumber {
class MissingNumber {
public static int missingNumber(int[] arr) {
public static int missingNumber(int[] arr) {
int i=0,n=arr.length+1;
int i=0,n=arr.length+1;
//Calculate sum of n natural numbers and store it
//计算n个自然数的和并存储它
int sum=0,sumOfNatural=n*(n-1)/2;
int sum=0,sumOfNatural=n*(n-1)/2;
//Loop through the array and calculate the sum of the elements of the array
//遍历数组并计算数组元素的和
for(i=0;i<n-1;i++){
for(i=0;i<n-1;i++){
sum+=arr[i];
sum+=arr[i];
}
//Return the difference of both
//返回两者的差值
return sumOfNatural - sum;
return sumOfNatural - sum;
}
public static void main(String []args){
public static void main(String []args){
//Input array
//输入数组
int []arr = {3,4,2,0,1,6};
int []arr = {3,4,2,0,1,6};
int result = missingNumber(arr);
int result = missingNumber(arr);
System.out.println(result);
System.out.println(result);
}
}
Output:
输出:
5
Calculate the sum of the first N natural number. Traverse the array using a loop and calculate its sum and store it in the variable named sum. Return the difference of the sum of natural number and sum. - Time Complexity: O(n), we are only iterating through the array.
计算前N个自然数的和。使用循环遍历数组并计算其总和,将结果存储在名为sum的变量中。返回自然数之和与sum的差值。- 时间复杂度:O(n),我们只遍历了一次数组。
- Space Complexity: O(1)
853. Write a program to print fibonacci series?
编写一个程序来打印斐波那契数列?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7258d557c902bc882d | 官方: 否 | 付费: 否
答案:
The Fibonacci sequence is a collection of integers (the Fibonacci numbers) that goes from 0 to 1, then 1, then 1, then a series of numbers that increase continuously after that. In the series, each number is equal to the sum of the two numbers that came before it.
斐波那契数列是一组整数(斐波那契数),从0到1开始,然后是1,然后是一个连续递增的数列。在该系列中,每个数字等于其前面两个数字之和。
public class FibanacciSeries
public class FibanacciSeries
{
public static void main(String []args){
public static void main(String []args){
int e1 = 0, e2 = 1, nextElement = 0;
int e1 = 0, e2 = 1, nextElement = 0;
int range=100;
int range=100;
// print the first two element of fibonacci which is 0 and 1
// 打印斐波那契数列的前两个元素,即0和1
System.out.print(e1 + "," +e2);
System.out.print(e1 + "," +e2);
//Initially nextElement will be the third element in the series
// 最初nextElement将是序列中的第三个元素
nextElement = e1 + e2;
nextElement = e1 + e2;
//Run loop till nextElement is equal to range
// 运行循环直到nextElement等于range
while (nextElement <= range) {
while (nextElement <= range) {
//Print the next element in the series
// 打印序列中的下一个元素
System.out.print(","+nextElement);
System.out.print(","+nextElement);
//Update e1 by assigning e2 to it
// 通过将e2赋值给e1来更新e1
e1 = e2;
e1 = e2;
//Update e2 by assigning nextElement to it
// 通过将nextElement赋值给e2来更新e2
e2 = nextElement;
e2 = nextElement;
nextElement = e1 + e2;
nextElement = e1 + e2;
}
}
}
In the Fibonacci series, we have to focus on three numbers because the next number in the series will be the addition of two preceding numbers.
在斐波那契数列中,我们必须关注三个数字,因为序列中的下一个数字将是前两个数字的和。
Take three variables initially the first(e1) and second(e2) will be 0 and 1. In the third variable(nextElement) we will store the next element in the series.
取三个变量,最初第一个(e1)和第二个(e2)将是0和1。在第三个变量(nextElement)中,我们将存储序列中的下一个元素。
So start a loop upto the range and in iteration do this, replace e1 with e2(e1=e2) and e2 with nextElement(e2=nextElement) and then in nextElement store the sum of e1 and e2. - Time Complexity: O(n), as the loop runs only from 1 to n.
因此,启动一个循环直到该范围,并在每次迭代中执行以下操作,用e2替换e1(e1=e2),用nextElement替换e2(e2=nextElement),然后在nextElement中存储e1和e2的和。- 时间复杂度:O(n),因为循环仅从1运行到n。
- Space Complexity: O(1)
854. What is the OOPs concept?
什么是OOPs概念?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7258d557c902bc8844 | 官方: 否 | 付费: 否
答案:
OOPs, or object-oriented programming is based on the idea of creating objects, using them repeatedly throughout the program, and then manipulating them to obtain the desired outcome.
OOPs,即面向对象编程,基于创建对象、在整个程序中反复使用它们,然后操控它们以获得预期结果的想法。
Four basic principles of OOPS are - Abstraction.
OOPs的四个基本原则是——抽象。
- Inheritance.
- Polymorphism.
- Encapsulation.
855. What is Abstraction in OOPS?
OOPs中的抽象是什么?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7258d557c902bc8847 | 官方: 否 | 付费: 否
答案:
Abstraction basically means hiding the background details of a program and showing only the necessary details. Abstract classes and interfaces can be used to accomplish abstraction.To make a class abstract, we simply use the abstract keyword.
抽象基本上意味着隐藏程序的背景细节,只显示必要的细节。抽象类和接口可用于实现抽象。要使一个类抽象,我们只需使用abstract关键字。
856. Explain Insertion sort?
解释插入排序?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7258d557c902bc884d | 官方: 否 | 付费: 否
答案:
Insertion Sort is a comparison-based sorting algorithm. In each iteration of insertion sort, it picks one element from the unsorted side and finds the current place for it on the sorted side of the list. It works similarly to card sorting.
插入排序是一种基于比较的排序算法。在插入排序的每次迭代中,它从未排序的一侧选择一个元素,并在列表的已排序一侧为其找到当前位置。它的工作原理类似于整理卡片。
It is adaptive in nature.
它具有自适应性。
// Insertion sort code in Java
// Java中的插入排序代码
// This sorting algorithm will sort the array in ascending order
// 此排序算法将按升序对数组进行排序
import java.util.Arrays;
import java.util.Arrays;
class InsertionSort {
class InsertionSort {
void sort(int arr[]) {
void sort(int arr[]) {
int sizeOfArray = arr.length;
int sizeOfArray = arr.length;
for (int i= 1; i< sizeOfArray ; i++) {
for (int i= 1; i< sizeOfArray ; i++) {
int key = arr[i];
int key = arr[i];
int j = i- 1;
int j = i- 1;
while (j >= 0 && temp < arr[j]) {
while (j >= 0 && temp < arr[j]) {
arr[j + 1] = arr[j];
arr[j + 1] = arr[j];
--j;
--j;
}
arr[j + 1] = temp;
arr[j + 1] = temp;
}
}
// Driver code
// 驱动代码
public static void main(String args[]) {
public static void main(String args[]) {
int[] unSortedArray = { 12, 10, 31, 4, 13 };
int[] unSortedArray = { 12, 10, 31, 4, 13 };
InsertionSort s = new InsertionSort();
InsertionSort s = new InsertionSort();
s.sort(unSortedArray);
s.sort(unSortedArray);
System.out.println("Sorted Array: ");
System.out.println("排序后的数组:");
System.out.println(Arrays.toString(unSortedArray));
System.out.println(Arrays.toString(unSortedArray));
}
}
Time Complexity: - The worst case of insertion sort will be when the given list is in descending order and the time complexity will be O(n^2).
时间复杂度:- 插入排序的最坏情况是当给定列表为降序时,时间复杂度为 O(n^2)。
- The average case time complexity of the insertion sort will also be O(n^2).
The best case of Insertion Sort will be when the list is sorted in Ascending order and the time complexity will be O(n).
Space Complexity: Space complexity will be O(1) .空间复杂度:空间复杂度为 O(1) 。
857. What is a firewall? How does it work?
什么是防火墙?它是如何工作的?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7258d557c902bc8857 | 官方: 否 | 付费: 否
答案:
A firewall is a network protection system that regulates internet traffic coming into, leaving, and inside a private network. Firewalls may be thought of as controlled borders or portals that control the flow of authorized and restricted web traffic in a private network. The phrase derives from the notion of physical walls acting as barriers to impede the spread of fire until emergency personnel can extinguish it. Similarly, network security firewalls are used for online traffic control, often to slow the spread of web dangers.
防火墙是一种网络保护系统,用于调节进入、离开私有网络以及网络内部的互联网流量。防火墙可以被视为受控的边界或门户,控制私有网络中授权和受限网络流量的流动。该术语源于物理墙壁作为障碍物以阻止火势蔓延直到应急人员扑灭它的概念。类似地,网络安全防火墙用于在线流量控制,通常旨在减缓网络危险的传播。
How a firewall works:
防火墙的工作原理:
Based on a set of pre-established rules, a firewall system examines network traffic. Following that, it filters the traffic to stop any of that traffic from originating from untrustworthy or unreliable sources. Only inbound traffic that is set to accept is permitted.
基于一组预先设定的规则,防火墙系统检查网络流量。随后,它会过滤流量,以阻止任何来自不可信或不可靠来源的流量。仅允许设置为接受的外部流量进入。
858. Does TCS Ninja have Negative Marking?
TCS Ninja考试是否有负向标记?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7358d557c902bc88a0 | 官方: 否 | 付费: 否
答案:
In the TCS Ninja exam, there is no negative marking although each question will have some predefined times. If you are unable to solve in the given time constraint then that question will be skipped automatically and you can not reattempt it. The time for each question can be from 1-3 minutes depending on the topic and level of the questions.
在TCS Ninja考试中,没有负向标记,尽管每个问题都有预定义的时间限制。如果您在给定的时间内无法解决问题,该问题将自动跳过,且您无法重新尝试。每个问题的时间根据主题和问题难度可能在1-3分钟之间。
859. Is the TCS Ninja interview tough?
TCS Ninja面试难吗?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7358d557c902bc88a3 | 官方: 否 | 付费: 否
答案:
You will be qualified to participate in the TCS NINJA Technical Interview after passing the NQT Round. Make every effort to get ready for this stage of the hiring process as it is the most difficult. Although if you are prepared for it then there will be no problem at all. In comparison to other similar companies, TCS ninja has the easiest interview process. If your basic knowledge of computer fundamentals and programming is clear then you can easily crack its interview.
通过NQT轮次后,您将有资格参加TCS NINJA技术面试。请尽一切努力为招聘流程的这一阶段做好准备,因为它是最困难的。尽管如果准备好了就不会有任何问题。与其他类似公司相比,TCS Ninja的面试流程是最简单的。如果您对计算机基础和编程的基本知识清晰,那么您可以轻松通过其面试。
860. How to apply for TCS Ninja?
如何申请TCS Ninja?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7358d557c902bc88a6 | 官方: 否 | 付费: 否
答案:
TCS Ninja has a highly difficult form-filling process. Many students who want to work at TCS are turned down because they did not complete the TCS application form. - Goto the TCS ninja website and register yourself.
TCS Ninja的申请表填写过程非常困难。许多想在TCS工作的学生因未完成TCS申请表而被拒绝。- 前往TCS Ninja网站并注册自己。
- Then click on the IT option.
- Then you will be required to fill in the basic details about yourself.
- After that is complete, your registration process with OTP received on your mobile number.
- After you have completed and double-checked all of the details, click the submit button.
- Also, register yourself on TCN ION. Without registering on it your application will not proceed further.
861. How can I introduce myself in the TCS Ninja interview?
在TCS Ninja面试中如何自我介绍?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7358d557c902bc88a9 | 官方: 否 | 付费: 否
答案:
If you are a fresher, start with your academics, projects, achievements, other curriculum activities, and strengths. Also, inform them about your interests, background, and so on. If you're an experienced professional, begin with your current position, achievements, previous work history, and then academic and personal details.
如果您是应届生,从您的学业、项目、成就、其他课外活动和优势开始。同时,告知他们您的兴趣、背景等。如果您是有经验的专业人士,从您当前的职位、成就、之前的工作经历开始,然后是学业和个人详细信息。
862. What is the TCS Ninja package for Freshers?
应届生的TCS Ninja待遇是多少?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7358d557c902bc88ac | 官方: 否 | 付费: 否
答案:
Shortlisted applicants are offered a package from 3.36 to 3.6 LPA by Tata Consultancy Services. Along with this, you can get a 60,000 bonus based on your performance.
入围的申请者由塔塔咨询服务公司提供3.36至3.6 LPA的待遇包。此外,根据您的表现,您还可以获得60,000的奖金。
863. How long is the TCS Ninja Interview?
TCS Ninja面试持续多长时间?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7358d557c902bc88af | 官方: 否 | 付费: 否
答案:
It depends upon the interviewer how long your interview can go. Generally, the interview lasts up to 15-20 min but sometimes it can be up to 30 mins. If interviewers have asked a coding question then it can also be up to 40-45 mins.
面试能持续多长时间取决于面试官。通常,面试持续15-20分钟,但有时可能长达30分钟。如果面试官问了编码问题,时间也可能长达40-45分钟。
864. What is the Eligibility Criteria at TCS Ninja?
TCS Ninja的资格标准是什么?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-ninja, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7358d557c902bc88b2 | 官方: 否 | 付费: 否
答案:
The revised Eligibility Criteria for TCS Ninja are listed in the table below and will be applicable to those who graduate in 2022. More information can be found in the table below:
修改后的TCS Ninja资格标准如下表所示,将适用于2022年毕业的学生。更多信息可参见下表:
| TCS Ninja Eligibility Criteria TCS Ninja资格标准 | Detailed Information 详细信息 |
|---|---|
| Qualification 学历要求 | B.E, B.tech(All branches), M.E, Mtech BCA, MCA B.E、B.Tech(所有分支)、M.E、M.Tech、BCA、MCA |
| 10th Marks 10年级成绩 | 60% or above 60%或以上 |
| 12th Marks 12年级成绩 | 60% or above 60%或以上 |
| Graduation 本科成绩 | Minimum 60% 最低60% |
| Gap in Education 教育间隔 | Up to two years 最多两年 |
| Backlogs or Arrears 挂科或欠修 | At the time of taking the Aptitude Exam, there should be one active backlog. 在参加能力测试时,只能有一个未结清的挂科。 |
865. What is the relation between the pages and frames in the OS?
在操作系统中,页面和帧之间有什么关系?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-nqt, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7458d557c902bc8938 | 官方: 否 | 付费: 否
答案:
In OS, paging is the method of dividing each process into small segments called pages and the main memory is also divided into the frames so that each frame can accommodate one data page. Hence, the relation between pages and frames is
在操作系统中,分页是将每个进程分成称为页面的小段,而主内存也被分成帧,以便每个帧可以容纳一个数据页面。因此,页面和帧之间的关系是
Size of page = Size of frame
页面大小 = 帧大小
866. Write a program to print the right-angled triangle pattern as shown below for any value of N input by the user.
编写一个程序,打印如下所示的直角三角形图案,其中N的值由用户输入。
- 知识点: 其他/未分类 (标签: interviewbit, tcs-nqt, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7458d557c902bc893b | 官方: 否 | 付费: 否
答案:
For N = 5
当N = 5时
** Let us observe the pattern carefully. We can see that in the 1st row, there is only 1 star and in the second row, there are 2 stars, and so on. This means that in the ith row, we are printing i number of stars. Following is the C++ program for the same.
- ** 让我们仔细观察这个图案。我们可以看到,在第1行只有1个星号,在第2行有2个星号,以此类推。这意味着在第i行,我们打印i个星号。下面是相应的C++程序。
C++ Program
C++程序
- ** 让我们仔细观察这个图案。我们可以看到,在第1行只有1个星号,在第2行有2个星号,以此类推。这意味着在第i行,我们打印i个星号。下面是相应的C++程序。
include
include
include
using namespace std;
using namespace std;
int main() {
int main() {
// Your code goes here;
// 你的代码写在这里;
int N;
int N;
cin>>N;
cin>>N;
for(int i=1;i<=N;i++) {
for(int i=1;i<=N;i++) {
for(int j=1;j<=i;j++) {
for(int j=1;j<=i;j++) {
cout<<"*";
cout<<"*";
}
cout<<"\n";
cout<<"\n";
}
}
Sample Input: 7
示例输入:7
Useful Resources
有用资源
- Technical Interview Questions
- Coding Interview Questions
- Interview Resources
- Programming- DSA
- Online Compiler
867. Can constructors be overridden?
构造函数可以被覆盖吗?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-nqt, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7458d557c902bc8941 | 官方: 否 | 付费: 否
答案:
No, constructors are not overridden. The sub-class constructors have to call the super-class constructor for their creation as they inherit from the super-class. Hence, the constructors cannot be overridden.
不可以,构造函数不能被覆盖。子类构造函数在创建时必须调用父类构造函数,因为它们继承自父类。因此,构造函数不能被覆盖。
868. What do you know about DCL?
你了解 DCL 吗?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-nqt, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7458d557c902bc8944 | 官方: 否 | 付费: 否
答案:
DCL means Data Control Language. DCL is responsible for managing the access and permissions to a DBMS. DCL helps in deciding which part of the Database should be accessed by which user. The 2 major commands in DCL are :
DCL 意为数据控制语言。DCL 负责管理对数据库管理系统(DBMS)的访问和权限。DCL 有助于决定数据库的哪部分应由哪个用户访问。DCL 中的两个主要命令是:
GRANT: This command is used to grant privileges to the Objects of the database for a user. It helps one user to grant certain permissions to the other users. 2. REVOKE: This command is used to withdraw the privileges for the objects of the database that have been granted to a user.
- GRANT:此命令用于向用户授予数据库对象的权限。它帮助一个用户向其他用户授予某些权限。 2. REVOKE:此命令用于撤销已授予用户的数据库对象权限。
869. Can we override the private methods?
我们能重写私有方法吗?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-nqt, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7558d557c902bc895d | 官方: 否 | 付费: 否
答案:
No, we can’t override the private methods. The private methods are those methods that have a scope only within the same class. Since they cannot be accessed outside the class even by a sub-class, there is no way to override the private methods.
不,我们不能重写私有方法。私有方法是那些作用域仅限于同一类的方法。由于它们无法在类外被访问,即使是子类也无法访问,因此没有办法重写私有方法。
870. List some major roles performed by an Operating System.
列出操作系统执行的一些主要角色。
- 知识点: 其他/未分类 (标签: interviewbit, tcs-nqt, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7558d557c902bc8960 | 官方: 否 | 付费: 否
答案:
An operating system performs various roles. Some of the examples are as follows:
操作系统执行各种角色。一些示例如下:
Resource Governor: The OS acts as a resource governor so that there is no load on the system. It allocates and deallocates the resources to the processes and also handles the synchronization of these resources among various processes. 2. Process Management: OS uses various Scheduling algorithms to manage the processes and their execution. This is done to increase the efficiency of the CPU so that it is never idle and the processes keep on executing. 3. Storage Management: OS acts as a storage manager bus using its File System. The data of the user is stored in the form of files and directories. 4. Memory Management: Memory management and storage management are confused with each other. However, the storage management concerns the file system and storage of the data in the Computer, the memory management means managing the memory allocation to the processes at the time of execution. Which process should be kept in the Ready Queue, which is in the Waiting Queue (both these queues are inside RAM only). 5. Privacy and Security: Privacy and security from any threats or viruses are also the responsibility of the OS. However, inter-process security is also the responsibility of the OS.
- 资源管理器:操作系统充当资源管理器,以确保系统没有负载。它为进程分配和释放资源,并处理这些资源在各类进程之间的同步。 2. 进程管理:操作系统使用各种调度算法来管理进程及其执行。这样做是为了提高CPU的效率,使其永远不会空闲,并且进程持续执行。 3. 存储管理:操作系统通过其文件系统充当存储管理器。用户的数据以文件和目录的形式存储。 4. 内存管理:内存管理和存储管理常被混淆。然而,存储管理涉及文件系统和计算机中数据的存储,而内存管理意味着在执行时管理分配给进程的内存。哪个进程应放在就绪队列中,哪个应在等待队列中(这两个队列仅在RAM内)。 5. 隐私和安全:保护系统免受任何威胁或病毒的隐私和安全也是操作系统的责任。然而,进程间安全也是操作系统的责任。
871. List some linear and some non-linear data structures.
列出一些线性和非线性数据结构。
- 知识点: 其他/未分类 (标签: interviewbit, tcs-nqt, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7558d557c902bc8963 | 官方: 否 | 付费: 否
答案:
- Linear Data structures: Arrays, Linked Lists, Stacks, Queues, and Dequeues, are all linear data structures.
- Non-Linear Data structures: The non-linear data structures can further be categorized as circular and non-circular. Some circular data structures are Circular Queue, Circular Dequeue, Circular Linked List, etc. Some non-circular data structures are Trees, Graphs, Priority queues, etc.
872. Write a program to find whether a number is even or odd. You are not allowed to use any arithmetic operator i.e. plus (+), minus (-), multiply (*), divide(/), and modulus (%) are not allowed.
编写一个程序来查找数字是偶数还是奇数。不允许使用任何算术运算符,即加号(+)、减号(-)、乘号(*)、除号(/)和取模(%)都不允许。
- 知识点: 其他/未分类 (标签: interviewbit, tcs-nqt, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7558d557c902bc8969 | 官方: 否 | 付费: 否
答案:
An even number in binary form will always have its Least Significant Bit (LSB) = 0. So, if we take the XOR of this number with 1, the answer will become one greater than the number itself. This is because 0 XOR 1 is 1 so, LSB will become 1 from 0 i.e. increment in the value by 1. So, we can say that if a number (N) is an even number then, if N ^ 1 = N + 1 else the number would be an odd number. So, the C++ program to solve the problem is given below.
二进制形式的偶数其最低有效位(LSB)始终为0。因此,如果我们用这个数与1进行异或运算,结果将比该数本身大1。这是因为0异或1等于1,所以LSB会从0变为1,即数值增加1。因此,我们可以说,如果一个数(N)是偶数,那么N ^ 1 = N + 1 成立;否则该数就是奇数。下面给出了解决该问题的C++程序。
C++ Program
C++程序
include
include
include
using namespace std;
using namespace std;
bool is_even(int N) {
bool is_even(int N) {
if((N ^ 1) == N + 1) return true;
if((N ^ 1) == N + 1) return true;
else return false;
else return false;
}
int main() {
int main() {
// Your code goes here;
// 你的代码写在这里;
int N;
int N;
cin>>N;
cin>>N;
if(is_even(N)) cout<<"The number is even";
if(is_even(N)) cout<<"这个数是偶数";
else cout<<"The number is odd";
else cout<<"这个数是奇数";
}
Sample Input (Even Number):
示例输入(偶数):
10
Output:
输出:
The number is even
这个数是偶数
Sample Input (Odd Number):
示例输入(奇数):
9
Output:
输出:
The number is odd.
这个数字是奇数。
873. Write a program to swap two numbers. You cannot use a third variable and you cannot use the + (plus), - (minus),* (multiply),/ (divide) operators.
编写一个程序来交换两个数字。你不能使用第三个变量,也不能使用 +(加)、-(减)、*(乘)、/(除)运算符。
- 知识点: 其他/未分类 (标签: interviewbit, tcs-nqt, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7558d557c902bc896f | 官方: 否 | 付费: 否
答案:
The solution is using the XOR operator. Following is the C++ code for the same.
解决方案是使用异或运算符。以下是相应的C++代码。
C++ Program
C++程序
include
include
include
using namespace std;
using namespace std;
void swap(int &x, int &y) {
函数 swap(int &x, int &y) {
x = x ^ y;
x = x ^ y;
y = x ^ y;
y = x ^ y;
x = x ^ y;
x = x ^ y;
}
int main() {
int main() {
// Your code goes here;
// 你的代码写在这里;
int x , y;
整数 x, y;
cin >> x >> y;
从输入流读取 x 和 y;
cout<<"Before swapping, x = " << x <<" y = " << y<<"\n";
输出"交换前,x = " << x <<" y = " << y<<"\n";
swap(x,y);
调用 swap(x,y);
cout<<"After swapping, x = " << x <<" y = " << y<<"\n";
cout<<"交换后,x = " << x <<" y = " << y<<"\n";
return 0;
return 0;
}
Sample Input:
示例输入:
10 20
Sample Output:
示例输出:
Before swapping, x = 10 y = 20
交换前,x = 10 y = 20
After swapping, x = 20 y = 10
交换后,x = 20 y = 10
874. What is the TCS NQT Eligibility?
TCS NQT的资格要求是什么?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-nqt, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7558d557c902bc89b9 | 官方: 否 | 付费: 否
答案:
The candidates completing their graduation or have completed their graduation from recognized Indian colleges/Universities can apply for the test. The minimum graduation percentage is 60% as so is for classes 10th and 12th. The age limit is from 18-28 years.
候选人需完成或已从印度认可的学院/大学毕业方可申请该考试。最低毕业成绩要求为60%,10年级和12年级的成绩要求也是如此。年龄限制为18至28岁。
875. How long is the TCS NQT Interview?
TCS NQT面试要多长时间?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-nqt, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7558d557c902bc89bc | 官方: 否 | 付费: 否
答案:
The TCS Ninja interview duration is between 20-30 minutes. However, the TCS Digital Interview is usually longer with a duration of 60-70 minutes, and can even last long to 90 minutes.
TCS Ninja的面试时长在20至30分钟之间。然而,TCS Digital的面试通常较长,时长约60至70分钟,甚至可能长达90分钟。
876. What is the salary of TCS NQT?
TCS NQT的薪资是多少?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-nqt, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7558d557c902bc89bf | 官方: 否 | 付费: 否
答案:
Through TCS NQT, TCS hires for 2 major roles. - TCS Ninja: Rs. 3.3-3.6 Lakhs Per Annum
通过TCS NQT,TCS招聘两个主要职位。- TCS Ninja:每年33万至36万卢比
- TCS Digital: Rs. 7-7.5 Lakhs Per Annum
877. How long is the TCS NQT score valid?
TCS NQT成绩的有效期是多长?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-nqt, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7558d557c902bc89c2 | 官方: 否 | 付费: 否
答案:
The TCS NQT score is valid for 2 years.
TCS NQT成绩有效期为2年。
878. What is a good score in TCS NQT?
在TCS NQT中多少分算是好成绩?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-nqt, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7558d557c902bc89c5 | 官方: 否 | 付费: 否
答案:
The percentage score that is sufficient to crack TCS NQT will be considered a good score. This differs every year as the number of candidates differs. Hence, we can’t say that a particular score is a good score in TCS NQT. However, you should try to aim for more than 70% in all the sections to level up your chances of selection.
足以通过TCS NQT的百分比分数通常被视为好成绩。这个分数每年不同,因为考生人数不同。因此,我们不能说某个特定分数在TCS NQT中就是好成绩。然而,你应该尽量在所有部分争取达到70%以上,以提高被选中的几率。
879. Is TCS NQT interview tough?
TCS NQT面试难吗?
- 知识点: 其他/未分类 (标签: interviewbit, tcs-nqt, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7558d557c902bc89c8 | 官方: 否 | 付费: 否
答案:
Interviews are not easy or tough. It depends on the level of the alignment of your skillsets with the Job Description. So, TCS NQT Interviews are not tough. They are based on checking the candidate’s problem-solving abilities along with core Computer Science knowledge and communication skills, etc. So, if you prepare well with your basics, you can easily crack the TCS NQT Interview.
面试并不简单或困难。这取决于你技能与职位描述的匹配程度。因此,TCS NQT面试并不难。它们旨在考察候选人的问题解决能力以及核心计算机科学知识和沟通技巧等。因此,如果你扎实准备基础知识,就可以轻松通过TCS NQT面试。
880. Calculate the total interest on a number of different loans.
计算多个不同贷款的总利息。
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7758d557c902bc8add | 官方: 否 | 付费: 否
答案:
However, there is no interest until the sum of 1000 is reached, but there is a 20% interest rate for the remaining quantities in the array. In this scenario, we will write a function "totalInterest" that takes two arguments: the first is the number of amounts in the array, and the second is the array of amounts. For example, if the first input is 4, and the amounts are 1000, 2000, 3000 and 4000. The total interest would be = 20% of 1000 + 20% of 2000 + 20% of 3000 + 20% of 4000 = 2000.
然而,在数组总和达到1000之前不计算利息,但之后剩余金额按20%的利率计算。在这种情况下,我们将编写一个函数“totalInterest”,它接受两个参数:第一个是数组中金额的数量,第二个是金额数组。例如,如果第一个输入是4,金额为1000、2000、3000和4000。总利息则为= 1000的20% + 2000的20% + 3000的20% + 4000的20% = 2000。
The C++ code for the above-mentioned problem is as follows:
上述问题的C++代码如下:
include<bits/stdc++.h>
using namespace std;
using namespace std;
double totalInterest(int totalAmounts, vectora)
double totalInterest(int totalAmounts, vectora)
{
double totalInterestValue = 0;
double totalInterestValue = 0;
for(int i = 0;i < totalAmounts;i ++)
for(int i = 0;i < totalAmounts;i ++)
{
if(arr[i] < 1000)continue;
if(arr[i] < 1000)continue;
totalInterestValue = totalInterestValue + (1.0(arr[i]-1000)0.2);
totalInterestValue = totalInterestValue + (1.0(arr[i]-1000)0.2);
}
return totalInterestValue;
return totalInterestValue;
}
int main()
int main()
{
int totalAmounts;
int totalAmounts;
cin >> totalAmounts;
cin >> totalAmounts;
vectora(totalAmounts);
vectora(totalAmounts);
for(int i = 0; i < totalAmounts; i ++)cin >> a[i];
for(int i = 0; i < totalAmounts; i ++)cin >> a[i];
cout << totalInterest(totalAmounts, a) << endl;
cout << totalInterest(totalAmounts, a) << endl;
return 0;
return 0;
}
In the code given above, we first declare a decimal variable "totalInterestValue" which would store the total interest yielded in our question. After that, we keep on incrementing its value by adding the total interest generated for each amount given if the value of the amount is greater than or equal to 1000. The interest is calculated only for amounts greater than 1000 and at a rate of 20%.
在上述代码中,我们首先声明一个十进制变量“totalInterestValue”,它用于存储问题中的总利息。之后,对于每个给定的金额,如果其值大于等于1000,我们通过添加该金额所产生的总利息来不断递增其值。利息仅针对大于1000的金额计算,利率为20%。
881. Given an array of positive integers, write code to return the differences between the sums of even and odd values in the given array.
给定一个正整数数组,编写代码返回该数组中偶数和奇数值之和的差值。
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7758d557c902bc8ae0 | 官方: 否 | 付费: 否
答案:
In this scenario, we would have to write a function "evenOddDiff" which takes two inputs as parameters: the number of positive integers in the array and the array of positive integers. For example, if the initial input is 3 numbers and the numbers are 5, 2 and 4, the difference between the sums of even and odd numbers is = (4+2) – (5) = 6 – 1 = 5
在这种场景下,我们需要编写一个函数“evenOddDiff”,该函数接受两个输入参数:数组中正整数的个数和正整数数组。例如,如果初始输入是3个数字,且数字为5、2和4,则偶数与奇数之和的差值 = (4+2) – (5) = 6 – 1 = 5
The C++ code for the above-mentioned problem is given below:
上述问题的C++代码如下所示:
include<bits/stdc++.h>
using namespace std;
using namespace std;
int evenOddDiff(int n, vector&a)
int evenOddDiff(int n, vector&a)
{
int oddSum = 0,evenSum = 0;
int oddSum = 0,evenSum = 0;
for(int i: a)
for(int i: a)
{
if(i & 1)
if(i & 1)
oddSum += i;
oddSum += i;
else
else
evenSum += i;
evenSum += i;
}
return evenSum - oddSum;
return evenSum - oddSum;
}
int main()
int main()
{
int n;
int n;
cin>>n;
cin>>n;
vectora(n);
vectora(n);
for(int j = 0; j < n; j ++)cin >> a[j];
for(int j = 0; j < n; j ++)cin >> a[j];
cout << evenOddDiff(n, a) << endl;
cout << evenOddDiff(n, a) << endl;
return 0;
return 0;
}
In the above-given code, we simply iterate over the elements of the list (given to us in the form of a C++ vector) and check whether each element of the list is an odd number or an even number using the condition "if(i && 1)". We also maintain two variables "oddSum" and "evenSum" which store the sum of odd numbers in the list and the sum of the even numbers in the list respectively. In the end, we simply return the difference between the values of the variables evenSum and oddSum as expected in the question.
在上述给出的代码中,我们简单地遍历列表中的元素(以C++向量的形式提供给我们),并使用条件“if(i && 1)”检查列表中的每个元素是奇数还是偶数。我们还维护了两个变量“oddSum”和“evenSum”,分别存储列表中奇数的总和和偶数的总和。最后,我们按照问题要求,简单地返回变量evenSum和oddSum之间的差值。
- Data Science
- All Events
- My Events
882. Differentiate between Swapping and Paging.
区分交换(Swapping)和分页(Paging)。
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7758d557c902bc8ae3 | 官方: 否 | 付费: 否
答案:
The key differences between Swapping and Paging are as follows:
交换(Swapping)和分页(Paging)之间的主要区别如下:
| SWAPPING 交换(SWAPPING) | PAGING 分页(PAGING) |
|---|---|
| When the entire process is shifted to secondary memory, it is referred to as swapping. 当整个进程被移入辅助内存时,这被称为交换。 | Paging takes place in the event of some part of a process being transferred to secondary memory. 分页发生在进程的某些部分被转移到辅助内存的情况下。 |
| Swapping involves the temporary transfer of a process from the main memory to secondary memory. 交换涉及将进程从主内存临时转移到辅助内存。 | In Paging, the contiguous block of memory is made non-contiguous but of fixed size called frame or pages. 在分页中,连续的内存块被变为非连续但具有固定大小的块,称为帧或页。 |
| No memory management is required for swapping. 交换不需要内存管理。 | Paging requires non-contiguous Memory Management. 分页需要非连续内存管理。 |
| Swapping provides the direction regarding the solution in it. 交换提供了关于其解决方案的方向。 | Paging does not give any direction regarding the solution in it. 分页不提供关于其解决方案的任何方向。 |
883. State the different states of a process.
说明进程的不同状态。
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7758d557c902bc8aec | 官方: 否 | 付费: 否
答案:
The different states of a process are as follows: - Created / New Process: A New or Created process is a program that will be loaded into the main memory by the operating system.
进程的不同状态如下:- 创建/新进程:新进程或已创建进程是操作系统将加载到主内存中的程序。
- Ready Process: When a process is created, it immediately goes into the ready state, where it waits for the CPU to be assigned to it. The operating system selects new processes from secondary memory and places them all in the main memory. Ready state processes are processes that are ready for execution and sit in the main memory. Many processes may be active in the ready state.
- Running Process: The Operating System will choose one of the processes from the ready state based on the scheduling mechanism. As a result, if our system only has one CPU, the number of running processes at any given time will always be one. If the system has n processors, we can have n processes executing at the same time.
- Blocked or Waiting Process: Depending on the scheduling method or the intrinsic behaviour of the process, a process can migrate from the Running state to the Block or Wait states. When a process waits for a specific resource to be assigned or for user input, the Operating System moves it to the block or wait state and assigns the CPU to other processes.
- Terminated Process: A process enters the termination state when it has completed its execution. The process's context (Process Control Block) will be removed as well, and the process will be terminated by the operating system.
884. Define microkernels in context to Operating Systems.
在操作系统上下文中定义微内核。
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7758d557c902bc8aef | 官方: 否 | 付费: 否
答案:
A microkernel is one of the kernel's classes. It manages all system resources because it is a kernel. However, user and kernel services are implemented in different address regions in a microkernel. User services are stored in user address space, while kernel services are stored in kernel address space, resulting in a smaller kernel and operating system. It provides the bare minimum of process and memory management services. Message passing is used to establish communication between client programs/applications and services executing in user address space, which slows down the execution microkernel. The Operating System is unaffected because user and kernel services are separated, thus if one fails, the kernel service is unaffected. As a result, it adds to one of the microkernel's benefits. It is easily extensible, in the sense that new services are introduced to the user address space rather than the kernel address space, requiring no changes in the kernel. It is also lightweight, safe, and dependable. Given below is a microkernel's architecture:
微内核是内核的一种类型。由于它是内核,它管理所有系统资源。然而,在微内核中,用户服务和内核服务实现在不同的地址区域中。用户服务存储在用户地址空间,而内核服务存储在内核地址空间,从而产生更小的内核和操作系统。它提供最小化的进程和内存管理服务。消息传递用于建立客户端程序/应用程序与在用户地址空间中执行的服务之间的通信,这会降低微内核的执行速度。操作系统不受影响,因为用户服务和内核服务是分离的,因此如果其中一个失败,内核服务不受影响。因此,这构成了微内核的优势之一。它易于扩展,即新服务被引入用户地址空间而不是内核地址空间,无需在内核中进行任何更改。它也轻量、安全和可靠。下面给出的是微内核的架构:
Some of the advantages of Microkernel are as follows: - The small and isolated architecture of this kernel makes it function better.
微内核的一些优点如下:- 小而隔离的架构使该内核运行得更好。
- Expansion of the system is easier, it is simply added to the system application without disturbing the kernel.
885. What is reentrancy in multiprogramming time sharing systems?
在多道程序设计分时系统中,什么是可重入性?
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7758d557c902bc8af4 | 官方: 否 | 付费: 否
答案:
For multiprogramming time-sharing systems, reentrancy is a very effective memory saving strategy. It has the capability of allowing several users to share a single copy of the program at the same time. Two of its main features are as follows: - The programme code is incapable of self-modification.
对于多道程序设计分时系统,可重入性是一种非常有效的内存节省策略。它能够允许多个用户同时共享程序的单一副本。它的两个主要特征如下:- 程序代码不能自我修改。
- Each user process's local data must be saved separately.
886. Define spooling in Operating Systems.
在操作系统中定义假脱机(Spooling)。
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7758d557c902bc8af7 | 官方: 否 | 付费: 否
答案:
Spooling is the process of temporarily storing data so that it can be used and processed by a device, program, or system. Data is delivered to and held in memory or other volatile storage until it is requested for execution by a program or computer. SPOOL is an acronym that stands for "Simultaneous Peripheral Operations Online." The spool is usually kept in the computer's physical memory, buffers, or interrupts for Input / Output devices. The FIFO (first-in, first out) method is used to process the spool in ascending order. Spooling is the process of collecting data from many Input / Output tasks and storing it in a buffer. This buffer is a section of memory or hard disc that Input / Output devices can access. An operating system performs the following tasks in a distributed environment: - Handles data spooling for Input / Output devices, which have various data access rates.
假脱机是暂时存储数据以便设备、程序或系统能够使用和处理这些数据的过程。数据被传递并保存在内存或其他易失性存储中,直到程序或计算机请求执行。SPOOL是“Simultaneous Peripheral Operations Online”(在线同时外围操作)的缩写。假脱机通常保存在计算机的物理内存、缓冲区或输入/输出设备的中断中。使用FIFO(先进先出)方法按升序处理假脱机。假脱机是收集许多输入/输出任务的数据并将其存储在缓冲区中的过程。该缓冲区是输入/输出设备可以访问的内存或硬盘的一部分。操作系统在分布式环境中执行以下任务:- 处理输入/输出设备的数据假脱机,这些设备具有不同的数据访问速率。
- Maintains the spooling buffer, which serves as a holding area for data while the slower device catches up.
- Because a computer can do Input / Output in parallel order, the spooling process maintains parallel computing. It is now feasible for the computer to read data from a tape, write data to disc, and print data to a tape printer all at the same time.
Printing is the most obvious example of spooling. The papers to be printed are stored in the SPOOL before being added to the printing queue. During this time, several programs can run and utilise the CPU without having to wait for the printer to complete the printing process on each paper individually. Many additional features can be added to the Spooling printing process, such as establishing priorities, receiving notifications when the printing process is complete, and choosing different types of paper to print on based on the user's preferences.
打印是假脱机最明显的例子。要打印的文件在添加到打印队列之前存储在SPOOL中。在此期间,多个程序可以运行并使用CPU,而无需等待打印机逐一完成每张纸的打印过程。假脱机打印过程还可以添加许多其他功能,例如设置优先级、在打印过程完成时接收通知,以及根据用户偏好选择打印不同类型的纸张。
Successful Tech Career for FREE!
免费开启成功的科技职业生涯!
Successful Tech Career!
成功的技术职业生涯!
Interview Process
面试流程
CTC & Designation
CTC与职位级别
Projects on the Job
工作项目
Referral System
推荐系统
Try It Out
试试看
2 Lakh+ Roadmaps Created
已生成20万+职业规划
887. State the difference between the following:
说明以下内容之间的区别:
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7758d557c902bc8b03 | 官方: 否 | 付费: 否
答案:
include
include "file"
The main difference between the two is in the search location for the included file of the preprocessor. The preprocessor looks for #include "file" in the same directory as the directive's file. Normally, this approach is used to incorporate programmatically created header files. On the other hand, the preprocessor searches for #include usually in search directories pre-designated by the compiler or the IDE (Integrated Development Environment) and not necessarily in the same directory as the directive's file. In most cases, this approach is used to incorporate standard library header files.
两者之间的主要区别在于预处理器对包含文件的搜索位置。预处理器会在指令所在文件的同一目录中查找 #include "file"。通常,这种方法用于包含编程创建的頭文件。另一方面,预处理器通常会在编译器或IDE(集成开发环境)预先指定的搜索目录中查找 #include ,而不一定是在指令所在文件的同一目录中。在大多数情况下,这种方法用于包含标准库头文件。
888. What do you understand by Function Overloading?
你对函数重载有什么理解?
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7758d557c902bc8b0a | 官方: 否 | 付费: 否
答案:
Object-Oriented programming has a feature called function overloading, which allows two or more functions to have the same name but distinct parameters. Function Overloading occurs when a function name is overloaded with several jobs. The "Function" name should be the same in Function Overloading, but the arguments should be different. Polymorphism is a feature of C++ that can be used to overload functions. An example of Function Overloading in C++ is given below:
面向对象编程有一个特性叫函数重载,它允许两个或多个函数具有相同的名称但不同的参数。当一个函数名被重载以执行多个任务时,就会发生函数重载。在函数重载中,“函数”名称应该相同,但参数应该不同。多态性是C++的一个特性,可用于重载函数。以下是C++中函数重载的一个示例:
include <bits/stdc++.h>
using namespace std;
using namespace std;
void foo(int n) {
void foo(int n) {
cout << " Integer Value: " << n << endl;
cout << " 整数值: " << n << endl;
}
void foo(double n) {
void foo(double n) {
cout << " Decimal Value " << n << endl;
cout << " 小数值 " << n << endl;
}
void foo(char n) {
void foo(char n) {
cout << " Character Value" << nc << endl;
cout << " 字符值" << nc << endl;
}
int main() {
int main() {
foo(40);
foo(40);
foo(452.144);
foo(452.144);
foo("A");
foo("A");
return 0;
return 0;
}
889. What do you understand about Structured Programming?
你对结构化编程有何理解?
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7758d557c902bc8b10 | 官方: 否 | 付费: 否
答案:
Structured Programming is a programming paradigm that involves a totally structured control flow. Structure refers to a block, such as (if/then/else), (while and for), block structures, and subroutines, that contains a set of rules and has a defined control flow. Structured programming is used in nearly all programming paradigms, including the OOPs model.
结构化编程是一种编程范式,涉及完全结构化的控制流。结构指的是一个块,例如(如果/那么/否则)、(while和for)、块结构和子程序,它包含一组规则并有明确的控制流。结构化编程几乎用于所有编程范式,包括面向对象编程模型。
890. Define inline functions in C and C ++. Also, give an example of an inline function in C.
在C和C++中定义内联函数。同时,给出一个C中内联函数的例子。
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7758d557c902bc8b13 | 官方: 否 | 付费: 否
答案:
An inline function in C or C++ is one that is declared with the keyword "inline". It serves two purposes: - It is a compiler directive that requests (it is not mandatory for the compiler to comply with the request of the inline function) that the compiler replaces the body of the function inline by performing inline expansion, that is, putting the function code at the location of each function call, hence reducing the overhead of a function call. It is similar to the register storage class specifier in this regard, which also gives an optimization indication. Inline functions are usually used for frequent calls to the same function.
C或C++中的内联函数是使用关键字“inline”声明的函数。它有两个目的: - 它是一个编译器指令,请求(编译器并非必须遵循内联函数的请求)编译器通过执行内联展开来内联替换函数体,即将函数代码放在每个函数调用的位置,从而减少函数调用的开销。在这方面,它类似于寄存器存储类说明符,后者也提供了优化提示。内联函数通常用于对同一函数的频繁调用。
The second goal of the keyword "inline" is to alter link behaviour. This is required by the C/C++ separate compilation and linkage model, notably because the function's definition (body) must be replicated in all translation units where it is used to allow inlining during compilation, which creates a collision during linking if the function has external linkage (it violates uniqueness of external symbols). This is handled differently in C and C++ (as well as dialects like GNU C and Visual C++).
An example of an inline function in C is given below:下面给出了 C 语言中内联函数的一个示例:
inline void addNumbers(int a, int b)
inline void addNumbers(int a, int b)
{
int ans = a + b;
int ans = a + b;
printf("Sum of the two numbers is: %d", ans);
printf("两个数字之和是:%d", ans);
}
Let us say that the above inline function is called somewhere in the main function of the C program as:
假设上述内联函数在 C 程序的主函数中被调用,如下所示:
int x = 10;
int x = 10;
int y = 20;
int y = 20;
addNumbers(x, y);
addNumbers(x, y);
Here, the "addNumbers(x, y);" function call will be replaced by the following piece of code in the main function itself by the compiler:
在这里,"addNumbers(x, y);" 函数调用将被编译器替换为主函数中的以下代码片段:
int x = 10;
int x = 10;
int y = 20;
int y = 20;
int ans = x + y;
int ans = x + y;
printf("Sum of the two numbers is: %d", ans);
printf("两个数字之和是:%d", ans);
891. Differentiate between a class and an object.
区分类和对象。
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7758d557c902bc8b1c | 官方: 否 | 付费: 否
答案:
Let us first look at the definitions of a class and an object before looking at the differences between the two: - Class: A class is the fundamental building unit of Object-Oriented Programming. It is a user-defined data type with its own set of data members and member functions which can be accessed and used by establishing a class instance (or an object). It is the blueprint of any item. For instance, consider the class "Accountant". There may be a lot of accounts with different names and categories, but they will all have some similar qualities, such as balances, account holder names, and so on. The account is the class, and the amount, as well as the account holder's name, are the properties.
让我们先看看类和对象的定义,然后再看它们之间的区别:- 类:类是面向对象编程的基本构建单元。它是一种用户定义的数据类型,具有自己的一组数据成员和成员函数,可以通过建立类实例(或对象)来访问和使用这些成员和函数。它是任何物品的蓝图。例如,考虑类"会计"。可能有许多具有不同名称和类别的账户,但它们都会有一些相似的性质,比如余额、账户持有人姓名等。账户是类,金额和账户持有人姓名是属性。
Object: A class's instance is an object. Objects can be used to access all of the class's data members and member functions. When a class is defined, no memory is allocated; nevertheless, memory is allocated when it is instantiated (that is when an object is formed). Consider the objects in the Account class: Savings account, Current account, and so on.
Now that we understand what classes and objects are, let us take a look at the differences between a class and an object:既然我们已经理解了类和对象是什么,让我们来看一下类和对象之间的区别:
| CLASS 类别 | OBJECT 对象 |
|---|---|
| Class is a blueprint or an object factory. 类是蓝图或对象工厂。 | Objects are instances of classes. 对象是类的实例。 |
| On the creation of a class, no memory is allocated as such. Due to not being available in the memory, classes cannot be manipulated. 创建类时,不会分配内存。由于不在内存中,类无法被操作。 | On the creation of an object, memory is allocated. This allows for the manipulation of objects. 创建对象时,会分配内存。这使得对象可以被操作。 |
| It is a logical entity. 它是逻辑实体。 | Objects are physical entities. 对象是物理实体。 |
| There are no values in the class that can be linked to the field. 类中没有与字段关联的值。 | Each object has its own set of values that it is associated with. 每个对象都有自己的关联值集。 |
| class { |
}; | // Class Declaration class Account{
}; | // 类声明 class Account{
public:
public:
void foo(){ cout // Main function of the program int main(){
void foo(){ cout // 程序的主函数 int main(){
Account newAccount; // Creation of Object
Account newAccount; // 创建对象
newAccount.foo(); //Calling the object's foo member function
newAccount.foo(); // 调用对象的foo成员函数
} |
892. Define unary operations in Relational Algebra in context to SQL.
在SQL上下文中,定义关系代数中的一元运算。
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7758d557c902bc8b2b | 官方: 否 | 付费: 否
答案:
Single operand operations are known as unary operations in Relational Algebra. In relational algebra, the operations PROJECTION and SELECTION and RENAME are unary operations: - SELECT: The SELECT operation is used to select a subset of tuples from a relation that meets a set of criteria. The SELECT operation can be thought of as a filter that keeps only those tuples that meet a set of criteria. Alternatively, the SELECT operation can be used to limit the tuples in relation to those that meet the criterion. The SELECT action can also be thought of as a horizontal division of the relation into two sets of tuples: those that fulfil the condition and are selected, and those that do not and are rejected.
单操作数运算在关系代数中称为一元运算。在关系代数中,投影、选择和重命名操作是一元运算: - 选择:选择操作用于从关系中选取满足一组条件的元组子集。选择操作可以被视为一个过滤器,仅保留满足条件的元组。或者,选择操作可用于将关系中的元组限制为满足条件的元组。选择操作也可以被视为将关系水平划分为两组元组:满足条件并被选中的元组,以及不满足条件并被拒绝的元组。
- PROJECT: If we consider a relation to be a table, the SELECT operation selects some of the rows while discarding others. The PROJECT operation, on the other hand, picks a subset of the table's columns while discarding the rest. If we're just interested in a few of a relation's attributes, we may use the PROJECT operation to project the relation over just those. As a result, the PROJECT operation's result can be seen as a vertical division of the relation into two relations: one with the required columns (attributes) and the operation's result, and the other with the rejected columns.
RENAME: Breaking a difficult chain of operations and renaming it as a relation with new names is sometimes straightforward and appropriate. There are numerous reasons to rename a relation, including:
It is possible that we will wish to save the outcome of a relational algebra expression as a relation so we may use it later. We may want to join relation to itself.我们希望将关系代数表达式的结果保存为关系,以便以后使用。我们可能希望将关系与自身连接。
893. Are the Tech Mahindra interview rounds easy?
Tech Mahindra的面试轮次容易吗?
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7858d557c902bc8b81 | 官方: 否 | 付费: 否
答案:
Well, the answer to this question depends from person to person and one's level of preparation. In general, it is said that Tech Mahindra interview questions are of easy-medium difficulty and if one is confident enough with his or her preparation, one should be good to go and not face a lot of problems in the Tech Mahindra interview process.
嗯,这个问题的答案因人而异,取决于个人的准备程度。一般来说,Tech Mahindra的面试问题难度为简单到中等,如果个人对自己的准备有信心,应该没问题,在Tech Mahindra面试过程中不会遇到太多问题。
894. Why does one want to join Tech Mahindra?
为什么想加入Tech Mahindra?
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7858d557c902bc8b84 | 官方: 否 | 付费: 否
答案:
Tech Mahindra attracts and develops top people by providing holistic long-term positions based on a digital learning environment that is accessible at any time, from any location, and on any device. As a new employee, Tech Mahindra is a fantastic place to start your career. It offers an outstanding work environment as well as a welcoming atmosphere with a positive ambience beneficial to personal and corporate progress. As a result, there is sufficient motivation to work at Tech Mahindra.
Tech Mahindra通过提供基于数字学习环境的整体长期职位来吸引和发展顶尖人才,该环境可在任何时间、任何地点、任何设备上访问。作为新员工,Tech Mahindra是开始职业生涯的绝佳场所。它提供出色的工作环境以及友好的氛围和积极的环境,有利于个人和公司发展。因此,在Tech Mahindra工作有足够的动力。
895. How to prepare for the Tech Mahindra written test exam?
如何准备Tech Mahindra笔试考试?
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7858d557c902bc8b87 | 官方: 否 | 付费: 否
答案:
The Tech Mahindra written test exam mostly consists of one written round on Quantitative Aptitude, Logical questions and English Grammar and another the essay writing round. The main mantra to prepare for these rounds is to practice a lot of questions on the topics mentioned and be confident during the exam. Some of the most important Tech Mahindra essay writing topics which one can prepare for the Tech Mahindra written test exam are as follows: - The impact of Social Media on the youth of today.
Tech Mahindra笔试考试主要由一轮书面测试组成,内容涵盖数量能力、逻辑问题和英语语法,以及另一轮论文写作。准备这些轮次的主要法门是大量练习上述主题的问题,并在考试中保持自信。一些最重要的Tech Mahindra论文写作主题,可以为Tech Mahindra笔试考试准备,如下所示: - 社交媒体对当今青年的影响。
- Stress and its effects on Youth.
- Why are Teenagers of today depressed?
896. What do you know about Tech Mahindra?
你对Tech Mahindra了解多少?
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7858d557c902bc8b8a | 官方: 否 | 付费: 否
答案:
You can start with a basic introduction to Tech Mahindra. For instance, you can say that Tech Mahindra, a subsidiary of the Mahindra Group, is a multinational technology corporation based in India that specialises in Information Technology (IT) and Business Process Outsourcing (BPO). After that, you can talk about one or two major projects undertaken by Tech Mahindra which you really liked and how they impacted the world, this will make the interviewer feel that you are also interested in working at Tech Mahindra. You can also mention a few of the principles of the company.
你可以从对 Tech Mahindra 的基本介绍开始。例如,你可以说 Tech Mahindra 是 Mahindra 集团的子公司,是一家总部位于印度的跨国科技公司,专门从事信息技术(IT)和业务流程外包(BPO)。之后,你可以谈谈 Tech Mahindra 承担的一两个你非常喜欢的重大项目,以及它们如何影响世界,这会让面试官觉得你也对在 Tech Mahindra 工作感兴趣。你还可以提及公司的几个原则。
897. What is the salary which freshers get in Tech Mahindra?
Tech Mahindra 给新员工的薪水是多少?
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7858d557c902bc8b8d | 官方: 否 | 付费: 否
答案:
The average salary for a Fresher Software Development Engineer at Tech Mahindra is around three and a half lakhs per year (3,50,000 per year) in India.
在印度,Tech Mahindra 的新软件开发工程师平均年薪约为三十五万卢比(每年 350,000 卢比)。
898. How long is the Tech Mahindra Recruitment Process?
Tech Mahindra 的招聘流程需要多长时间?
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7858d557c902bc8b90 | 官方: 否 | 付费: 否
答案:
The Tech Mahindra Recruitment Process usually lasts for about two to three months based on the availability of the interviewers and the candidates.
Tech Mahindra 的招聘流程通常持续约两到三个月,具体取决于面试官和候选人的时间安排。
899. Why are you suitable for this role?
你为什么适合这个职位?
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7858d557c902bc8b96 | 官方: 否 | 付费: 否
答案:
When you are asked questions like this, you should mention your strengths and skills that are appropriate for the position. One typical answer to this question can be as follows:
当遇到这类问题时,你应该提及与职位相符的优势和技能。回答这个问题的一个典型答案如下:
"I am convinced that I am fit for this role for a variety of reasons, but above all because of my commitment to keep going. To succeed in this role, I have all the required skills. I am working on learning for myself. My skills and abilities are in perfect agreement with the requirements of this position. Above all, my communication and leadership skills make me a strong candidate for that position."
“我确信我适合这个职位,原因有很多,但最重要的是我对坚持的承诺。要在这个职位上取得成功,我具备所有必需技能。我正在努力学习自我提升。我的技能和能力与这个职位的要求完全吻合。最重要的是,我的沟通和领导能力使我成为这个职位的强力候选人。”
900. What makes you want to change jobs?
是什么让你想换工作?
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7858d557c902bc8b99 | 官方: 否 | 付费: 否
答案:
This is a popular question among seasoned professionals looking for a change. The simplest way to respond to this question is to say that you are leaving your current job to pursue a promotion. Make sure you do not criticise or speak negatively about your current employer.
这是寻找变化的资深专业人士中常见的问题。回答这个问题最简单的方式是说,你离开当前工作是为了追求晋升。确保你不要批评或负面评价当前雇主。
901. What are the recruitment policies of Tech Mahindra?
Tech Mahindra 的招聘政策是什么?
- 知识点: 其他/未分类 (标签: interviewbit, tech-mahindra, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tech Mahindra
- id: 69b37c7858d557c902bc8b9c | 官方: 否 | 付费: 否
答案:
The recruitment policies of Tech Mahindra are as follows: - If a candidate has attended an interview within the last six months from the date of a new application, then he or she is ineligible to apply till the six month period is not over.
Tech Mahindra 的招聘政策如下: - 如果候选人在新申请日期前六个月内参加过面试,那么在六个月期限结束前,他或她没有资格申请。
- If an applicant is rejected by Tech Mahindra in an interview, he or she will be ineligible to apply for six months after the interview.
- An applicant is ineligible to apply if Tech Mahindra decides to reject his or her application for any reason.
- If a candidate is unable to offer an interview after applying to Tech Mahindra for whatever reason, the candidate has the option to reapply and participate in the selection process.
902. Write a program to implement topoSort in the graph.
编写一个程序在图(graph)中实现拓扑排序(topoSort)。
- 知识点: 其他/未分类 (标签: interviewbit, tiger-analytics, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Tiger Analytics
- id: 69b37c7c58d557c902bc8d89 | 官方: 否 | 付费: 否
答案:
from collections import deque
from collections import deque
def topoSort(graph):
def topoSort(graph):
calculate in-degree of each node
in_degree = {node: 0 for node in graph}
in_degree = {node: 0 for node in graph}
for node in graph:
for node in graph:
for neighbor in graph[node]:
for neighbor in graph[node]:
in_degree[neighbor] += 1
in_degree[neighbor] += 1
enqueue nodes with in-degree of 0
queue = deque([node for node in graph if in_degree[node] == 0])
queue = deque([node for node in graph if in_degree[node] == 0])
topo_order = []
topo_order = []
perform topological sort
while queue:
while queue:
node = queue.popleft()
node = queue.popleft()
topo_order.append(node)
topo_order.append(node)
for neighbor in graph[node]:
for neighbor in graph[node]:
in_degree[neighbor] -= 1
in_degree[neighbor] -= 1
if in_degree[neighbor] == 0:
if in_degree[neighbor] == 0:
queue.append(neighbor)
queue.append(neighbor)
check for cycle
if len(topo_order) != len(graph):
if len(topo_order) != len(graph):
raise ValueError("Graph contains cycle!")
raise ValueError("图包含环!")
return topo_order
return topo_order
The topoSort function takes in a directed graph represented as a dictionary where each key is a node and the value is a set of neighbors. For example, the following graph can be represented as {'a': {'b', 'c'}, 'b': {'c', 'd'}, 'c': {'d'}, 'd': set()}:
topoSort函数接收一个有向图,该图以字典形式表示,其中每个键是一个节点,值是一个邻居集合。例如,以下图可以表示为{'a': {'b', 'c'}, 'b': {'c', 'd'}, 'c': {'d'}, 'd': set()}:
a --> b --> d
a --> b --> d
| |
v v
v v
c --> d
c --> d
The implementation first calculates the in-degree of each node by iterating through the graph and counting the number of edges pointing into each node. Nodes with an in-degree of 0 are enqueued into a queue, which serves as the starting point for the topological sort.
该实现首先通过遍历图并计算指向每个节点的边的数量来计算每个节点的入度。入度为0的节点被加入队列,该队列作为拓扑排序的起始点。
The topological sort is performed by dequeuing a node from the queue and appending it to the topo_order list. For each of the dequeued node's neighbors, the in-degree is decremented. If the neighbor's in-degree becomes 0, it is enqueued into the queue.
拓扑排序通过从队列中取出一个节点并将其添加到topo_order列表来执行。对于被取出节点的每个邻居,入度会减一。如果邻居的入度变为0,则将其加入队列。
This process is repeated until all nodes have been dequeued and added to the topo_order list. At the end of the function, the topo_order list is returned. If the length of the topo_order list does not match the number of nodes in the graph, it means that there is a cycle in the graph, so a ValueError is raised.
此过程重复进行,直到所有节点都被取出并添加到topo_order列表中。在函数末尾,返回topo_order列表。如果topo_order列表的长度与图中的节点数不匹配,则意味着图中存在环,因此会引发ValueError。
903. How do you approach debugging a complex software problem, and what tools do you use to aid in the process?
你如何处理复杂的软件问题调试,以及在过程中使用哪些工具来辅助?
- 知识点: 其他/未分类 (标签: interviewbit, tiger-analytics, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tiger Analytics
- id: 69b37c7d58d557c902bc8db7 | 官方: 否 | 付费: 否
答案:
Debugging complex software problems is a challenging task, but a structured approach and the right tools can help make it more manageable. Some of the steps to take and tools to use when debugging a complex software problem are:
调试复杂的软件问题是一项具有挑战性的任务,但采用结构化方法和合适的工具可以帮助使其更为可控。调试复杂软件问题时采取的一些步骤和使用的一些工具包括:
Reproduce the problem: The first step is to reproduce the problem consistently. This involves identifying the specific steps that lead to the problem and ensuring that they can be reliably repeated. 2. Gather information: Once the problem has been reproduced, information can be gathered about the error. This can include error messages, log files, and stack traces. 3. Break the problem down: The problem can be broken down into smaller parts and isolate the issue. 4. Test hypotheses: Based on the information gathered, hypotheses are created about the cause of the problem and test them one by one to narrow down the possibilities. 5. Use debugging tools: There are several tools available to aid in the debugging process, such as debuggers, profilers, and tracing tools. These can help to identify specific areas of the code that are causing the problem, track variables and their values, and identify performance bottlenecks. 6. Collaborate with others: If the problem is particularly complex, it may be useful to collaborate with other developers or experts who may have more experience in the relevant areas.
- 重现问题:第一步是持续重现问题。这涉及确定导致问题的具体步骤,并确保它们能被可靠地重复。 2. 收集信息:问题重现后,可以收集有关错误的信息。这可能包括错误消息、日志文件和堆栈跟踪。 3. 分解问题:可以将问题分解成更小的部分并隔离问题所在。 4. 测试假设:基于收集的信息,对问题原因提出假设,并逐一测试以缩小可能性范围。 5. 使用调试工具:有多种工具可辅助调试过程,如调试器、性能分析器和跟踪工具。这些工具有助于识别导致问题的特定代码区域、跟踪变量及其值,并识别性能瓶颈。 6. 与他人协作:如果问题特别复杂,与相关领域经验更丰富的其他开发者或专家协作可能很有用。
904. How do you handle memory leaks in a software application?
您如何处理软件应用程序中的内存泄漏?
- 知识点: 其他/未分类 (标签: interviewbit, tiger-analytics, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tiger Analytics
- id: 69b37c7d58d557c902bc8dc5 | 官方: 否 | 付费: 否
答案:
Memory leaks occur when a program fails to release memory that is no longer needed and leads to a buildup of unused memory over time. This can cause the program to slow down or crash, and in extreme cases, it can cause the entire system to become unstable. Some of the ways to handle memory leaks in a software application are:
内存泄漏发生在程序未能释放不再需要的内存时,导致未使用的内存随时间累积。这可能使程序变慢或崩溃,在极端情况下,可能导致整个系统变得不稳定。在软件应用程序中处理内存泄漏的一些方法包括:
Use a memory profiler: A memory profiler is a tool that helps to identify memory leaks by monitoring memory usage during program execution. It can show which objects are consuming the most memory and once the memory leak is identified, it can be fixed by updating the code accordingly. 2. Free up memory when it is no longer needed: One of the most common causes of memory leaks is forgetting to free up memory when it is no longer needed. This can be done by explicitly deallocating memory using the "free" or "delete" functions in the code. 3. Use smart pointers: Smart pointers are objects that manage memory allocation and deallocation automatically. They help to ensure that memory is always properly released, even in cases where the code may have unexpected errors or exceptions. 4. Avoid circular references: Circular references occur when two or more objects reference each other, creating a loop that prevents them from being properly deallocated. To avoid this, it is important to design the code to use weak references or break the circular reference by introducing a third object to manage the relationship. 5. Test the application thoroughly: Regular testing of the application can help to identify memory leaks early on. Automated testing tools can be used to simulate heavy usage scenarios and identify potential issues.
- 使用内存分析器:内存分析器是一种工具,通过在程序执行期间监控内存使用来识别内存泄漏。它可以显示哪些对象消耗了最多内存,一旦识别出内存泄漏,就可以通过更新相应代码来修复。 2. 在不再需要时释放内存:内存泄漏最常见的起因之一是忘记在不再需要时释放内存。这可以通过在代码中使用“free”或“delete”函数显式释放内存来完成。 3. 使用智能指针:智能指针是自动管理内存分配和释放的对象。它们有助于确保即使代码中出现意外错误或异常,内存也总能被正确释放。 4. 避免循环引用:循环引用发生在两个或多个对象相互引用时,形成循环,阻止它们被正确释放。为避免这种情况,重要的是设计代码使用弱引用,或通过引入第三个对象来管理关系以打破循环引用。 5. 彻底测试应用程序:定期测试应用程序有助于及早识别内存泄漏。自动化测试工具可用于模拟高负载场景并识别潜在问题。
905. How do you handle missing or corrupted data in a dataset during the data cleaning process?
在数据清洗过程中,您如何处理数据集中的缺失或损坏数据?
- 知识点: 其他/未分类 (标签: interviewbit, tiger-analytics, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tiger Analytics
- id: 69b37c7d58d557c902bc8dcc | 官方: 否 | 付费: 否
答案:
During the data cleaning process, missing or corrupted data can be a common problem. Here are a few ways to handle it:
在数据清洗过程中,缺失或损坏的数据是常见问题。以下是处理它的几种方法:
Remove the affected data: If only a small amount of data is missing or corrupted, it may be best to simply remove it from the dataset altogether. 2. Replace with mean/median/mode: If a larger amount of data is missing, you can replace the missing values with the mean, median, or mode of the other data points in that column. 3. Impute missing data: Imputation is a more advanced technique that involves using machine learning algorithms to predict what the missing data should be based on other features in the dataset. This method can be more accurate than simply replacing it with mean/median/mode, but it also requires more computational resources and may not always be appropriate depending on the nature of the missing data. 4. Consult with a subject matter expert: If you're unsure of how to handle missing or corrupted data, it may be helpful to consult with someone who has expertise in the domain or field of study that the data relates to. They may be able to offer insights on how to interpret or handle the data in question.
- 移除受影响数据:如果只有少量数据缺失或损坏,最好直接从数据集中将其移除。 2. 用平均值/中位数/众数替换:如果缺失数据较多,可以用该列其他数据点的平均值、中位数或众数替换缺失值。 3. 插补缺失数据:插补是一种更高级的技术,涉及使用机器学习算法根据数据集中的其他特征预测缺失数据应为何值。这种方法可能比简单用平均值/中位数/众数替换更准确,但它也需要更多计算资源,且根据缺失数据的性质,可能并非总是适用。 4. 咨询领域专家:如果您不确定如何处理缺失或损坏的数据,咨询在数据相关领域或研究领域有专长的人可能很有帮助。他们可能能提供关于如何解释或处理这些数据的见解。
It's important to note that the approach to handling missing or corrupted data will depend on the specific characteristics of the dataset and the goals of the analysis. It's always a good practice to carefully evaluate the data and consider multiple approaches to cleaning and preprocessing it before proceeding with any analysis.
需要注意的是,处理缺失或损坏数据的方法将取决于数据集的具体特征和分析目标。在进行任何分析前,始终谨慎评估数据并考虑多种清洗和预处理方法是良好实践。
906. How would you define a superclass?
您如何定义超类?
- 知识点: 其他/未分类 (标签: interviewbit, tiger-analytics, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tiger Analytics
- id: 69b37c7d58d557c902bc8de7 | 官方: 否 | 付费: 否
答案:
A superclass, also known as a base class or parent class, is a class from which a subclass or child class is derived. For example, if the Student class is derived from the Person class, the Person class is considered the superclass. The superclass or base class is a class that serves as a parent to another class or class, such as the Bike class serving as a superclass to the Vehicle class.
超类,也称为基类或父类,是子类或派生类所基于的类。例如,如果Student类派生自Person类,则Person类被视为超类。超类或基类是充当另一个或多个类的父类的类,例如Bike类作为Vehicle类的超类。
907. What is the difference between a primitive data type and an object?
原始数据类型和对象之间有什么区别?
- 知识点: 其他/未分类 (标签: interviewbit, tiger-analytics, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tiger Analytics
- id: 69b37c7d58d557c902bc8ded | 官方: 否 | 付费: 否
答案:
Primitive data types are simple data types that are not composed of other data types. Examples of primitive data types include int, char, and boolean. On the other hand, an object is a complex data type that is composed of one or more primitive data types. An example of an object would be an ArrayList, which is composed of an array of ints.
原始数据类型是不由其他数据类型组成的简单数据类型。原始数据类型的示例包括int、char和boolean。另一方面,对象是由一个或多个原始数据类型组成的复杂数据类型。对象的示例可以是ArrayList,它由int数组组成。
Tiger Analytics Interview Preparation
908. How long is the Tiger Analytics Interview process?
Tiger Analytics面试过程持续多长时间?
- 知识点: 其他/未分类 (标签: interviewbit, tiger-analytics, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tiger Analytics
- id: 69b37c7e58d557c902bc8e32 | 官方: 否 | 付费: 否
答案:
Depending on the position you're seeking and your degree of expertise, the time of the Tiger Analytics interview process can change. The interviewing procedure might often take a few weeks to a few months .
根据您申请的职位和专业水平,Tiger Analytics面试过程的时间可能会有所变化。面试流程通常可能需要几周到几个月的时间。
There are often numerous steps in the Tiger Analytics interview process, including a phone screening interview, a technical interview, and an in-person interview. There might also be further rounds of interviews in specific circumstances, such as a case study or a behavioural interview.
Tiger Analytics面试过程通常包括多个步骤,包括电话筛选面试、技术面试和现场面试。在特定情况下,可能还有额外的面试轮次,例如案例研究或行为面试。
909. Is the Tiger Analytics interview tough?
Tiger Analytics面试难吗?
- 知识点: 其他/未分类 (标签: interviewbit, tiger-analytics, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tiger Analytics
- id: 69b37c7e58d557c902bc8e35 | 官方: 否 | 付费: 否
答案:
Interviews can vary in difficulty depending on the company and position you are applying for. In general, analytics roles may require a strong foundation in statistics, data analysis, and data modelling. You may be asked to demonstrate your proficiency in these areas through technical questions, case studies, or practical exercises. Soft skills such as communication, problem-solving, and collaboration may also be evaluated.
面试的难度可能因公司和申请的职位而异。一般来说,分析类职位可能要求扎实的统计学、数据分析和数据建模基础。你可能会被要求通过技术问题、案例研究或实践练习来展示这些方面的熟练程度。沟通、解决问题和协作等软技能也可能被评估。
To prepare for an analytics interview, it's a good idea to review your technical knowledge, practice your problem-solving skills, and be prepared to discuss your past experience and how it relates to the role. You may also want to research common interview questions for analytics roles and practice answering them.
为准备分析类面试,建议复习技术知识、练习问题解决能力,并准备好讨论你的过往经验及其与职位的关联。你也可以研究分析类职位的常见面试问题并练习回答。
Remember that the goal of the interview process is to determine if you are a good fit for the role and the company culture. So be yourself, be confident, and show that you are passionate about the work you do.
请记住,面试过程的目标是确定你是否适合该职位和公司文化。所以做真实的自己,保持自信,并展示你对所做工作的热情。
910. Does Tiger Analytics pay well?
Tiger Analytics 的薪资待遇好吗?
- 知识点: 其他/未分类 (标签: interviewbit, tiger-analytics, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tiger Analytics
- id: 69b37c7e58d557c902bc8e38 | 官方: 否 | 付费: 否
答案:
Tiger Analytics pays its employees competitively with industry standards. The salary offered to an employee depends on several factors, including job role, level of experience, location, and other variables. It is best to research and compare salaries across different companies and industries before making any conclusions about a particular company's pay scale. The average Tiger Analytics salary ranges from ₹3.0 Lakhs/year for a Technical Writer to ₹51.7 Lakhs/year for a Director.
Tiger Analytics 以符合行业标准的竞争力薪资支付员工。提供给员工的薪资取决于多种因素,包括职位角色、经验水平、地点和其他变量。在得出关于某特定公司薪资水平的结论之前,最好研究并比较不同公司和行业的薪资。Tiger Analytics 的平均薪资范围从技术写作人员的每年₹3.0万卢比到总监的每年₹51.7万卢比不等。
911. Is Tiger analytics a good company?
Tiger Analytics 是一家好公司吗?
- 知识点: 其他/未分类 (标签: interviewbit, tiger-analytics, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tiger Analytics
- id: 69b37c7e58d557c902bc8e3b | 官方: 否 | 付费: 否
答案:
Tiger Analytics is a data analytics consulting company that offers services to companies in a variety of sectors, including e-commerce, healthcare, and finance. The business has won numerous honours and awards. In Glassdoor, Tiger Analytics has an overall rating of 4.1 out of 5, based on over 729 reviews left anonymously by employees. 83% of employees would recommend working at Tiger Analytics to a friend and 78% have a positive outlook for the business. The company has received multiple awards ranging from being recognized as a Leader by Forrester Research to being ranked among the fastest-growing tech companies by Inc. and Financial Times. The company consistently features in prestigious ‘Best Analytics Firms’ lists.
Tiger Analytics 是一家数据分析咨询公司,为包括电子商务、医疗保健和金融在内的多个行业的企业提供服务。该公司赢得了众多荣誉和奖项。在 Glassdoor 上,Tiger Analytics 的总体评分为 5 分中的 4.1 分,基于员工匿名提交的 729 多条评论。83% 的员工会向朋友推荐在 Tiger Analytics 工作,78% 的员工对该公司持积极展望。该公司获得了多项奖项,从被 Forrester Research 评为领导者,到被 Inc. 和 Financial Times 评为增长最快的科技公司之一。该公司一直出现在享有盛誉的“最佳分析公司”名单中。
Through a variety of training programs, hackathons, and knowledge-sharing sessions, Tiger Analytics places a high emphasis on the professional development of its employees and provides possibilities for both personal and professional development.
通过各种培训项目、黑客马拉松和知识分享会议,Tiger Analytics 高度重视员工的专业发展,并提供个人和专业成长的机会。
Yet, it's crucial to conduct your own research and assess the business in light of your personal priorities and values. When determining whether Tiger Analytics is a suitable fit for you, you may want to take into account aspects like the corporate culture, work-life balance, perks, and remuneration.
然而,重要的是进行自己的研究,并根据个人优先事项和价值观评估该公司。在决定 Tiger Analytics 是否适合你时,可能需要考虑公司文化、工作生活平衡、福利和薪酬等方面。
912. What is the difference between Swapping and Paging.
交换(Swapping)和分页(Paging)有什么区别?
- 知识点: 其他/未分类 (标签: interviewbit, uber, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 优步
- id: 69b37c8258d557c902bc9094 | 官方: 否 | 付费: 否
答案:
The main differences between Swapping and Paging are given below:
交换和分页之间的主要区别如下所示:
| SWAPPING 交换 | PAGING 分页 |
|---|---|
| In swapping, the whole process in its entirety is moved to the secondary memory. 在交换中,整个进程被完整地移动到辅存中。 | Paging is done when some part of a process is being transferred to secondary memory. 当进程的部分内容被转移到辅存时,会进行分页。 |
| In Swapping, the temporary transfer of a process from the main memory to secondary memory takes place. 在交换中,进程会从主存临时转移到辅存。 | In Paging, a contiguous block of memory is made non-contiguous but of fixed size called frame or pages. 在分页中,内存中的连续块被变成非连续但大小固定的块,称为帧或页面。 |
| Swapping requires no memory management. 交换不需要内存管理。 | Paging requires non-contiguous Memory Management. 分页需要非连续的内存管理。 |
| The direction regarding the solution in it is provided in swapping. 在交换中会提供解决方案的方向。 | No direction regarding the solution in it is provided in Paging. 在分页中不提供解决方案的方向。 |
913. Write functional code for solving the problem given below:
编写功能代码来解决下面给出的问题:
- 知识点: 其他/未分类 (标签: interviewbit, uber, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: 优步
- id: 69b37c8358d557c902bc90a8 | 官方: 否 | 付费: 否
答案:
Print the Next Greater Element (NGE) for each element in an array. The Next Greater Element for an element x is the first greater element in the array on the right side of x. Consider the next greater element as -1 for elements for which no greater element exists. For example, The rightmost element of an array always has the next bigger element as -1. All elements in a decreasingly ordered array have the next greater element as -1. The next bigger elements for each element in the input array [3, 4, 1, 12] are as follows.
打印数组中每个元素的下一个更大元素(NGE)。元素x的下一个更大元素是数组中x右侧的第一个更大元素。如果不存在更大的元素,则将下一个更大元素视为-1。例如,数组的最右边元素的下一个更大元素总是-1。递减数组中所有元素的下一个更大元素都是-1。输入数组[3, 4, 1, 12]中每个元素的下一个更大元素如下所示。
NGE 3 -> 4, 4 -> 12, 1 -> 12, 12 -> -1
NGE 3 -> 4, 4 -> 12, 1 -> 12, 12 -> -1
C ++ function which solves the given Data Structures and Algorithm problem is given below:
下面给出了解决上述数据结构和算法问题的C++函数:
vector
vectornextGreater(vector a)
{
int n = a.size();
int n = a.size();
stackst;
stackst;
vectorans;
vectorans;
/ pushing the first element into the stack /
/ 将第一个元素推入栈中 /
st.push(a[0]);
st.push(a[0]);
// iterating for the remaining elements
// 遍历剩余元素
for (int j = 1; j < n; j ++)
for (int j = 1; j < n; j ++)
{
if (st.empty()) {
if (st.empty()) {
st.push(a[j]);
st.push(a[j]);
continue;
continue;
}
/* if the stack is not empty, we are going to pop an element from the stack and if the popped element is lesser
/* 如果栈不为空,我们将从栈中弹出一个元素,如果弹出的元素
in value than the current element, then we:
在值上小于当前元素,那么我们将:
a) add the popped element to answer
a) 将弹出的元素添加到答案中
b) keep popping while elements are
b) 持续弹出元素,只要元素
smaller and stack is not empty
较小且栈不为空
*/
while (st.empty() == false
while (st.empty() == false
&& st.top() < a[j])
&& st.top() < a[j])
{
answer.push_back(st.top());
answer.push_back(st.top());
st.pop();
st.pop();
}
/* pushing the current element to stack so that we can find
/* 将当前元素压入栈中,以便我们可以找到
the next greater for it */
它的下一个更大元素 */
st.push(a[j]);
st.push(a[j]);
}
/ for all the elements left in the stack after the iteration, we add -1 to our ans vector /
/ 对于迭代后栈中剩余的所有元素,我们在答案向量中添加 -1 /
while (st.empty() == false) {
当栈不为空时,执行以下操作:
ans.push_back(-1);
将-1添加到答案向量中;
st.pop();
st.pop();
}
return ans;
return ans;
}
We can solve this problem using a stack using the following algorithm: - Push the first element to the top of the stack.
我们可以使用栈通过以下算法解决此问题:- 将第一个元素压入栈顶。
- Pick the remaining items one by one and repeat the next procedures in a loop.
- We mark the current element as next.
- If the stack is not empty, compare the top element of the stack to the next.
- If the following element is greater than the top element, remove the element from the stack. The next bigger element for the popped element is next.
- Continue popping off the stack as long as the popped element is smaller than the next. For all such popped elements, next becomes the next bigger element.
- Finally, move on to the next item in the stack.
- When the loop in step 2 is finished, remove all the elements from the stack and print -1 as the next element for them.
914. What is the eligibility criteria for Software Engineers at Uber
Uber软件工程师的资格标准是什么?
- 知识点: 其他/未分类 (标签: interviewbit, uber, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 优步
- id: 69b37c8458d557c902bc916f | 官方: 否 | 付费: 否
答案:
The majority of other companies' new qualification standards are identical to Uber's. Candidates must check the following eligibility criteria (both graduation and general criteria) before applying for the Uber Recruitment process:
其他大多数公司的新资格标准与Uber相同。候选人在申请Uber招聘流程前,必须检查以下资格标准(包括毕业标准和一般标准):
Graduation Criteria: The following are the graduation requirements for the Uber Recruitment Process:-
毕业标准:以下是Uber招聘流程的毕业要求:-
| Criteria of Graduation 毕业标准 | Details 详情 |
|---|---|
| Branch of Study or Department of Study 学习专业或院系 | Candidates must be having a Bachelor's of Technology or B.Tech. (or equivalent degrees like Bachelor's of Engineering or B.E.) in computer science, electrical engineering, mechanical engineering, electronics engineering, or mathematical sciences at the time of application. They can also hold a dual degree from two different fields that are linked. M.S. (Master of Science) in Computer Science or Information Technology or any other related fields. 申请时,候选人必须持有计算机科学、电气工程、机械工程、电子工程或数学科学专业的学士学位(B.Tech.或同等学历,如B.E.)。他们也可以持有两个相关领域的双学位。计算机科学、信息技术或其他相关领域的硕士(M.S.)学位也可以。 |
| Mode of Study 学习方式 | Full-Time courses recognised by the Central or State governments of India. (Not the part-time or correspondence courses available.) 印度中央或州政府认可的全日制课程(不包括兼职或函授课程)。 |
| Minimum Percentage criteria with which Graduation needs to be done. 毕业最低百分比标准 | Sixty Percent (60%). 60%。 |
| Experience 经验 | It is necessary to have extensive software engineering knowledge from previous projects or internships. If the candidate has relevant work experience or has done competitive coding, that is a great plus. It's a boost if you have been published in magazines or have active initiatives. 必须具备以往项目或实习中积累的广泛软件工程知识。如果候选人具有相关工作经验或参与过竞争性编程,则是一大优势。如果在杂志发表过文章或有活跃的倡议项目,也是一种加分项。 |
| Backlogs 待处理学业问题 | No Backlogs are active during the Uber Recruitment Process. 在Uber招聘流程期间,不得有未解决的学业问题(如挂科)。 |
Academic Criteria: The following are the academic requirements for the Uber Selection Process:-
学术标准:以下是Uber选拔流程的学术要求:-
| Academic Criteria 学术标准 | Information 信息 |
|---|---|
| Minimum Percentage required in 10th Standard and 12th Standard Examinations. 10年级和12年级考试的最低百分比要求 | 60% |
Required Skills: The skills which are required for the Uber Recruitment Process are as follows:- - Technical Skills: Expertise in Computer Science Fundamentals, Data Structure and Algorithms and command in one Programming Language at least like Python, Java, C ++, etc.
所需技能:Uber招聘流程所需的技能如下:- - 技术技能:精通计算机科学基础、数据结构和算法,并至少掌握一种编程语言,如Python、Java、C++等。
Other General Skills: Some of the other skills which an ideal candidate should possess are as follows:
Candidates must be confident in their ability to create infrastructure and tools. They must want to work as part of a team and achieve daily goals. Candidates must possess a strong sense of personal responsibility. They must be able to communicate effectively in a corporate setting. The candidate should know about the Software Development Cycle and be comfortable implementing it in his or her daily job. Candidates must be able to build programs or software that are long-lasting, legible, and reusable. They should be able to learn new approaches and languages with ease.候选人必须对自己创建基础设施和工具的能力充满信心。他们必须愿意作为团队的一部分工作,并实现每日目标。候选人必须具有强烈的个人责任感。他们必须能够在企业环境中有效沟通。候选人应了解软件开发周期,并能在日常工作中自如地实施。候选人必须能够构建持久、清晰且可重用的程序或软件。他们应能轻松学习新方法和新语言。
915. What is the average salary of a Software Engineering Fresher at Uber?
Uber软件工程应届生的平均工资是多少?
- 知识点: 其他/未分类 (标签: interviewbit, uber, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 优步
- id: 69b37c8458d557c902bc917e | 官方: 否 | 付费: 否
答案:
The usual salary of a Software Development Engineer Fresher at Uber is around Rs. 20,45,000 per year. The Software Development Engineer salaries at Uber usually range from around Rs. 5,22,000 to around ₹26,98,000 per year.
Uber软件开发工程师应届生的通常年薪约为20,45,000卢比。Uber软件开发工程师的薪资通常在每年5,22,000卢比到26,98,000卢比之间。
916. How long is the Uber Software Engineering interview?
Uber软件工程面试时长是多久?
- 知识点: 其他/未分类 (标签: interviewbit, uber, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 优步
- id: 69b37c8458d557c902bc9181 | 官方: 否 | 付费: 否
答案:
A typical Uber Software Engineering interview lasts for about forty minutes to an hour. The entire Uber Recruitment process consists of various rounds (both coding round and interview) and usually lasts for about two to three months roughly.
典型的Uber软件工程面试持续约四十分钟到一小时。整个Uber招聘流程包含多轮环节(包括编码轮和面试),通常大约持续两到三个月。
917. What are the most crucial subjects to cover in preparation for a Uber Interview?
在准备Uber面试时,哪些是最关键的科目需要覆盖?
- 知识点: 其他/未分类 (标签: interviewbit, uber, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 优步
- id: 69b37c8458d557c902bc9189 | 官方: 否 | 付费: 否
答案:
Your programming abilities will be examined during the Uber Interview. Students will be quizzed on computer science fundamentals such as computer networking, database management systems, software management, operating systems, and cloud computing. Make sure you are ready for the projects you have created. Prepare the things that your CV mentions. In Uber HR interviews, the most commonly asked questions are concerning relocation, resumes, reasons for leaving a previous company (for experienced folks making a company switch), and expected income.
Uber面试期间将考察你的编程能力。学生会就计算机科学基础知识接受测验,如计算机网络、数据库管理系统、软件管理、操作系统和云计算。确保你对自己创建的项目准备充分,并准备好简历中提及的内容。在Uber人力资源面试中,最常见的问题涉及搬迁、简历、离职原因(针对有经验并跳槽的候选人)以及预期薪资。
918. How should one answer the following question: Why are you interested in joining Uber?
应该如何回答以下问题:你为什么对加入Uber感兴趣?
- 知识点: 其他/未分类 (标签: interviewbit, uber, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 优步
- id: 69b37c8558d557c902bc918c | 官方: 否 | 付费: 否
答案:
Uber recruits and maintains top people by offering inclusive and fast-growing opportunities through a digital learning environment that is accessible from anywhere, at any time, on any device. Uber is an excellent environment for new employee to begin their career sheerly because of the immense exposure one gets over there and their fantastic work environment. Uber offers a warm, friendly setting that encourages personal and corporate development and that is why I and today's perspective programmers should be interested in joining Uber.
通过提供随时随地、在任何设备上可访问的数字学习环境中的包容性和快速成长机会,Uber招募并留住顶尖人才。对于新员工来说,Uber是开启职业生涯的绝佳环境,纯粹因为在那里能获得的巨大曝光度和出色的工作氛围。Uber提供温暖友好的环境,鼓励个人和企业发展,这就是为什么我和当今有远见的程序员应该有兴趣加入Uber。
919. How difficult is an Uber Software Engineering interview?
Uber软件工程面试有多难?
- 知识点: 其他/未分类 (标签: interviewbit, uber, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 优步
- id: 69b37c8558d557c902bc918f | 官方: 否 | 付费: 否
答案:
It makes no difference if the Uber Software Engineering interview is difficult or simple. The truth is that the more prepared you are for the interview, the more likely you are to pass it. It is important that you familiarise yourself with the various interview stage, rounds, and questions at Uber. Programming languages, internships, products, software, and projects on which candidates have recently or previously worked are a few of the things asked in an Uber Software Engineering interview. As a result, instead of focusing on how tough or easy the interviews are, one should concentrate on how to increase one's technical and cultural skills.
Uber软件工程面试是难还是简单并不重要。事实是,你为面试准备得越充分,通过的可能性就越大。关键是你需要熟悉Uber的各个面试阶段、轮次和问题。候选人最近或以前工作过的编程语言、实习、产品、软件和项目是Uber软件工程面试中会问到的几个方面。因此,与其关注面试有多难或多简单,不如专注于如何提升自己的技术和文化技能。
Coding Problems
0/1
Easy Problems
简单问题
Graph Data Structure & Algorithms
图数据结构与算法
Path in Directed Graph
有向图中的路径
Easy
简单
42.41 Mins
42.41分钟
Solve
解答
0/5
Intermediate Problems
中级问题
Dynamic Programming
动态规划
Two Pointers
双指针
Arrays
数组
Minimum Difference Subsets!
最小差分子集!
Medium
中等
52.34 Mins
52.34 分钟
Solve
解答
Counting Subarrays!
计算子数组!
Medium
中等
52.43 Mins
52.43 分钟
Solve
解答
Subarrays with distinct integers!
不同整数的子数组!
Medium
中等
64.19 Mins
64.19 分钟
Solve
解答
Collect Resources
收集资源
Medium
中等
53.17 Mins
53.17 分钟
Solve
解答
Set Intersection
集合交集
Medium
中等
59.3 Mins
59.3分钟
Solve
解答
920. In an array num containing n distinct numbers in the range [0, n], return the number that's missing.
在一个包含n个不同数字的数组num中,数字范围在[0, n]内,返回缺失的那个数字。
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Virtusa
- id: 69b37c8a58d557c902bc93f6 | 官方: 否 | 付费: 否
答案:
Example - [0,6,8,5,1,2,3,4] Missing number = 7
示例 - [0,6,8,5,1,2,3,4] 缺失的数字 = 7
We can solve this problem with the help of a hash table that marks the number from 0 to n. And after marking, if any number is left for marking, then we will return that number. But this takes extra space. So to optimize this we can apply mathematics for finding the sum of numbers from an array to the actual sum that needs to exist from (1 - n). So the code solution will be -
我们可以借助哈希表来解决这个问题,该表标记从0到n的数字。标记后,如果有任何数字未标记,则返回该数字。但这会占用额外空间。因此,为了优化,我们可以应用数学方法来计算数组中的数字之和与应存在的(1到n)实际总和之间的差异。所以代码解决方案将是 -
//Method that returns the missing number
//返回缺失数字的方法
public int missingNumber(int[] nums) {
public int missingNumber(int[] nums) {
int sumArray = 0;
int sumArray = 0;
int n = nums.length;
int n = nums.length;
//calculating sum of number from array
//计算数组中数字的和
for(int i = 0; i<n; i++)
for(int i = 0; i<n; i++)
sumArray += nums[i];
sumArray += nums[i];
//The actual sum
//实际的和
int ActualSum = (n*n + n)/2;
int ActualSum = (n*n + n)/2;
// Returning the difference, the will be the missing number
//返回差值,即为缺失的数字
return ActualSum - sumArray;
return ActualSum - sumArray;
}
Useful Resources
有用资源
- Java Interview Questions
- Software Engineering Interview Questions
- Technical Interview Questions
- Automation Testing Interview Questions
- Data Science Interview Questions and Answers
- Pega Interview Questions
- Selenium Interview Questions
- Coding Interview Questions
- Interview Resources
- DSA- Programming
- Mock Interview
921. Write a program to reverse the digits of x in such a way that the value stays within the range of a signed 32-bit integer. If reversing x causes the value to jump outside that range, return 0.
编写一个程序,反转x的数字,使得值保持在有符号32位整数的范围内。如果反转x导致值超出该范围,返回0。
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Virtusa
- id: 69b37c8a58d557c902bc93f9 | 官方: 否 | 付费: 否
答案:
For example:
例如:
Input- 54678 Output - 87645
输入- 54678 输出 - 87645
Input- 2147483647 Output - 0 (because reversing it goes out of bound to an integer.)
输入- 2147483647 输出 - 0(因为反转后超出了整数的范围。)
Since we need to store the maximum integer also that is not possible with the integer data type. As it goes out of bounds. So we can either use data type long or the other that can be easily identifiable. In this solution, we will be using the char data type to do that. So here is the solution for that.
由于我们还需要存储最大整数,而整数数据类型无法做到这一点,因为它会超出范围。所以我们可以使用long数据类型或其他更容易识别的类型。在这个解决方案中,我们将使用char数据类型来完成。因此,以下是该问题的解决方案。
//Method will reverse the integer and return it.
//方法将反转整数并返回它。
public int reverse(int x) {
public int reverse(int x) {
//Convert the number to a character array to reverse.
//将数字转换为字符数组以便反转。
char [] ans = Integer.toString(x).toCharArray();
char [] ans = Integer.toString(x).toCharArray();
//Storing max and min possible value for boundary case
//存储边界情况下的最大和最小可能值
int maxAllowedPos = 2147483647;
int maxAllowedPos = 2147483647;
int maxAllowedNeg = -2147483648;
int maxAllowedNeg = -2147483648;
if(x > 0){
if(x > 0){
int i = 0, j = ans.length-1;
int i = 0, j = ans.length-1;
while(i < j){
while(i < j){
char c = ans[i];
char c = ans[i];
ans[i++] = ans[j];
ans[i++] = ans[j];
ans[j--] = c;
ans[j--] = c;
}
String an = new String(ans);
String an = new String(ans);
double t = Double.parseDouble(an);
double t = Double.parseDouble(an);
if(t > maxAllowedPos)
如果(t > maxAllowedPos)
return 0;
return 0;
return (int)t;
返回 (int)t;
}else{
}否则{
int i = 1, j = ans.length-1;
int i = 1, j = ans.length-1;
while(i < j){
while(i < j){
char c = ans[i];
char c = ans[i];
ans[i++] = ans[j];
ans[i++] = ans[j];
ans[j--] = c;
ans[j--] = c;
}
String an = new String(ans);
String an = new String(ans);
double d = Double.parseDouble(an);
double d = Double.parseDouble(an);
if(d < maxAllowedNeg)
如果(d < maxAllowedNeg)
return 0;
return 0;
return (int)d;
返回 (int)d;
}
}
922. Rotate an array by k degrees to the right, assuming the array is initially positioned in that direction. Write a program for that.
将数组向右旋转 k 度,假设数组初始位置朝向该方向。编写一个程序实现该功能。
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Virtusa
- id: 69b37c8a58d557c902bc93fc | 官方: 否 | 付费: 否
答案:
//Method that rotates the array.
//旋转数组的方法。
public int[] rotate(int[] nums, int k) {
public int[] rotate(int[] nums, int k) {
int n = nums.length;
int n = nums.length;
if(n == 1)
if(n == 1)
return;
return;
//Determining the exact k number of steps to rotate
//确定旋转的精确步数k
if(k > n)
if(k > n)
k = k%n;
k = k%n;
//Finding the index from which the array has to be rotated.
//找出数组需要旋转的起始索引
int i = n-k, j = 0;
int i = n-k, j = 0;
//Creating the auxiliary array that stores the reversed array.
//创建存储反转数组的辅助数组
int [] auxArray = new int[k];
int [] auxArray = new int[k];
//Traversing the and storing the elements that are unreversed.
//遍历并存储未反转的元素
while(i < n){
while(i < n){
auxArray[j++] = nums[i++];
auxArray[j++] = nums[i++];
}
i = n-1;
i = n-1;
//reversing the remaining element to the array answer.
//将剩余元素反转并存储到结果数组
while(i >= k){
while(i >= k){
nums[i] = nums[i-k];
nums[i] = nums[i-k];
i--;
i--;
}
return auArray;
return auArray;
}
- Data Science
- All Events
- My Events
923. You are given two non-empty linked lists that represent non-negative integers. The nodes of each list contain a single digit, in reverse order of the most significant digit. Add the two numbers and return the sum as a linked list.
给定两个非空链表,它们表示非负整数。每个列表的节点包含一个数字,按最高有效位的逆序排列。将两个数字相加,并以链表形式返回总和。
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Virtusa
- id: 69b37c8a58d557c902bc93ff | 官方: 否 | 付费: 否
答案:
class Solution {
class Solution {
private int val = 0;
private int val = 0;
private int carry = 0;
private int carry = 0;
//This method reverse the linked list.
//此方法反转链表。
private ListNode reverse(ListNode head){
private ListNode reverse(ListNode head){
if(head == null || head.next == null)
if(head == null || head.next == null)
return head;
return head;
ListNode t = reverse(head.next);
ListNode t = reverse(head.next);
head.next.next = head;
head.next.next = head;
head.next = null;
head.next = null;
return t;
return t;
}
// This method takes the 2 linked list and creates a new linked list with answer.
// 此方法接收两个链表并创建一个包含答案的新链表。
private ListNode addNumber(ListNode l1, ListNode l2){
private ListNode addNumber(ListNode l1, ListNode l2){
//The approach used is the same as the normal arithmetic we learn during school days.
//所用的方法与我们在学校学到的普通算术相同。
//We keep count of the carry and create the node from that.
//我们记录进位并根据进位创建节点。
if(l1 == null && l2 != null){
if(l1 == null && l2 != null){
val = l2.val + carry;
val = l2.val + carry;
carry = val/10;
carry = val/10;
ListNode n = new ListNode((val%10), addNumber(l1, l2.next));
ListNode n = new ListNode((val%10), addNumber(l1, l2.next));
return n;
返回 n;
}
else if(l1 != null && l2 == null){
else if(l1 != null && l2 == null){
val = l1.val + carry;
val = l1.val + carry;
carry = val/10;
carry = val/10;
ListNode n = new ListNode((val%10), addNumber(l1.next, l2));
ListNode n = new ListNode((val%10), addNumber(l1.next, l2));
return n;
返回 n;
}
else if(l1 != null && l2 != null){
否则如果(l1 != null && l2 != null){
val = l1.val + l2.val + carry;
val = l1.val + l2.val + carry;
carry = val/10;
carry = val/10;
ListNode n = new ListNode((val%10), addNumber(l1.next, l2.next));
ListNode n = new ListNode((val%10), addNumber(l1.next, l2.next));
return n;
返回 n;
}
else{
否则{
if(carry != 0)
如果(carry != 0)
return new ListNode(carry);
返回 new ListNode(carry);
return null;
返回 null;
}
}
public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
l1 = reverse(l1);
l1 = reverse(l1);
l2 = reverse(l2);
l2 = reverse(l2);
l1 = addNumber(l1, l2);
l1 = addNumber(l1, l2);
return reverse(l1);
return reverse(l1);
}
}
924. Determine if the given string s contains only the characters '(', ')', '{', '}', '[' and ']'. To do this, first find all the characters that are not brackets (i.e. '[', ']', '{', and '(') and '(' and ')').
确定给定的字符串 s 是否只包含字符 '(', ')', '{', '}', '[' 和 ']'。为此,首先找出所有不是括号的字符(即 '[', ']', '{' 和 '(')以及 '(' 和 ')')。
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Virtusa
- id: 69b37c8a58d557c902bc9402 | 官方: 否 | 付费: 否
答案:
Then see if there are any remaining characters that are brackets (i.e. '{', '}', '(' and ')'). If the string is valid, output true. Otherwise, the output is false. If the string is invalid, the output is false.
然后检查是否还有剩余字符是括号(即 '{'、'}'、'(' 和 ')')。如果字符串有效,则输出 true。否则,输出为 false。如果字符串无效,则输出为 false。
We can use the stack to test the expression. The solution can be like this -
我们可以使用栈来测试该表达式。解决方案可以如下所示——
//This method returns true if the expression is valid. Oterwise false.
//该方法在表达式有效时返回 true,否则返回 false。
public boolean isValid(String s) {
public boolean isValid(String s) {
int n = s.length();
int n = s.length();
if(n%2 != 0)
if(n%2 != 0)
return false;
返回 false;
// Created a stack to keep count of the valid parentheses.
// 创建了一个栈来统计有效括号的数量。
char[] stack = new char[n];
char[] stack = new char[n];
int top = -1;
int top = -1;
//Looping and pushing and poping the element from the stack based
// 循环并根据元素的合法性
//on it's validity
// 对栈进行入栈和出栈操作
for(int i = 0; i < n; i++){
for(int i = 0; i < n; i++){
char ch = s.charAt(i);
char ch = s.charAt(i);
if(ch == '(' || ch == '{' || ch == '['){
if(ch == '(' || ch == '{' || ch == '['){
stack[++top] = ch;
stack[++top] = ch;
}
else{
否则{
if((ch == ')') && (top == -1 || stack[top] != '('))
如果((ch == ')') && (top == -1 || stack[top] != '('))
return false;
返回 false;
else if((ch == '}') && (top == -1 || stack[top] != '{'))
否则如果((ch == '}') && (top == -1 || stack[top] != '{'))
return false;
返回 false;
else if((ch == ']') && (top == -1 || stack[top] != '['))
否则如果((ch == ']') && (top == -1 || stack[top] != '['))
return false;
返回 false;
top--;
top--;
}
}
// If the stack is empty then the parentheses are valid. So return true
// 如果栈为空,则括号有效。因此返回 true
if(top == -1)
如果(top == -1)
return true;
返回 true;
//Otherwise return false
//否则返回 false
return false;
返回 false;
}
925. Write a program to check if any element occurs at least twice in the array nums and return true. If every element is unique, return false.
编写一个程序,检查数组 nums 中是否有任何元素至少出现两次,并返回 true。如果每个元素都是唯一的,则返回 false。
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Virtusa
- id: 69b37c8a58d557c902bc9405 | 官方: 否 | 付费: 否
答案:
We can solve this problem by keeping the element in the HashMap. And if any of the elements appear to be already existing then we need to return true. And in this, HashMap helps us to do that. So the
我们可以通过将元素存储在 HashMap 中来解决这个问题。如果任何元素已经存在,那么我们需要返回 true。在这方面,HashMap 帮助我们实现了这一点。因此
//Method that returns the boolean if element found duplicate or not
//返回布尔值的方法,用于判断是否找到重复元素
public boolean containsDuplicate(int[] arr) {
public boolean containsDuplicate(int[] arr) {
//LENGTH OF THE ARRAY
//数组的长度
int n = arr.length;
int n = arr.length;
//IF ONLY ONE ELEMENT RETURN FALSE
//如果只有一个元素,返回 false
if(n == 1){return false;}
if(n == 1){return false;}
//FOR STORING THE ELEMENTS
//用于存储元素
HashSetset = new HashSet<>();
HashSetset = new HashSet<>();
//O OT N IF ANY ELEMENT ALREADY PRESENT
//如果任何元素已经存在
//RETURN TRUE
//返回真
for(int i =0; i<n; i++)
for(int i =0; i<n; i++)
{
if(set.contains(arr[i])){return true;}
if(set.contains(arr[i])){return true;}
set.add(arr[i]);
set.add(arr[i]);
}
//IF NO DUPLICATES PRESENT RETURN FALSE
//如没有重复项返回假
return false;
返回 false;
}
926. You are provided with an original 0-indexed 1-dimensional integer array and two integers, m, and n. You must create a 2D array of m rows and n columns using all of the elements from the original.
给你一个原始的0索引的一维整数数组和两个整数m和n。你必须用原始数组中的所有元素创建一个m行n列的二维数组。
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Virtusa
- id: 69b37c8a58d557c902bc9411 | 官方: 否 | 付费: 否
答案:
The original array contains the integer indices from 0 to n - 1 (inclusive). The second row of the 2D array is constructed from the integer indices from n to 2 * n - 1 (inclusive).
原始数组包含从0到n - 1(含)的整数索引。二维数组的第二行由从n到2 * n - 1(含)的整数索引构成。
This can be a simple solution by creating a 2D array of the size given row and column. Then we can simply start traversing the 1D array and input the element to the 2D array based on the row and column.
这可以是一个简单的解决方案,即创建给定行和列大小的二维数组。然后我们可以简单开始遍历一维数组,并根据行和列将元素输入到二维数组中。
class Solution {
class Solution {
public int[][] construct2DArray(int[] arr, int r, int c) {
public int[][] construct2DArray(int[] arr, int r, int c) {
//IF THE NUMBER OF ELEMENTS IN THE ARRAY IS LESS OR GREATER
//如果数组中的元素数量小于或大于
//WE RETURN EMPTY ARRAY
//我们返回空数组
if(r*c != arr.length){return new int0;}
if(r*c != arr.length){return new int0;}
//2D ARRAY
//二维数组
int ans[][] = new intr;
int ans[][] = new intr;
//COUNTER
//计数器
int count = 0;
int count = 0;
//2 FOR LOOPS FOR ADDING THE ELEMENTS IN 2D ARRAY
//两个for循环用于在二维数组中添加元素
for(int i= 0;i <r; i++)
for(int i= 0;i <r; i++)
{
for(int j =0; j<c; j++)
for(int j =0; j<c; j++)
{
ansi = arr[count];
ansi = arr[count];
count++;
count++;
}
}
//RETURNING 2D ARRAY
//返回二维数组
return ans;
return ans;
}
}
927. Explain in detail about binary Search. How does it work? And Implement it.
详细解释二分搜索。它是如何工作的?并实现它。
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Virtusa
- id: 69b37c8a58d557c902bc941e | 官方: 否 | 付费: 否
答案:
Binary search is one of the most common algorithms used in computer programming. It’s so common that it’s almost always implemented in computer programs. Binary search is quite useful, and you can see this by looking at how often it appears in different programming languages. Binary search is the faster algorithm that can help to search the element in just O(log n) time. The only requirement for binary search to work is that the element must be in sorted order.
二分搜索是计算机编程中使用最广泛的算法之一。它太常见了,以致于几乎总是被实现到计算机程序中。二分搜索非常有用,你可以通过查看它在不同编程语言中出现的频率来了解这一点。二分搜索是一种更快的算法,只需 O(log n) 时间即可帮助搜索元素。二分搜索工作的唯一要求是元素必须按排序顺序排列。
Binary Search follows the approach of eliminating the elements in the list that are not required because of the sorted property. It is being assured that the element doesn’t exist there. So to make this approach practical, the binary search tries to search for the key at such position in the list, which helps to identify on what side of the position, the key must exist in the list. So binary search finds the middle position in the list and compares it with the key. If the element matches with the key, then it returns true indicating that the key is found in the list. Otherwise, it checks with the element that in which side, the key must exist in the list. Based on this, the algorithm eliminates the other half. And it does this in every iteration. This is how on every iteration a binary search eliminates half of the list. So by eliminating half it takes O(log n) time.
二分搜索遵循基于排序特性,删除列表中不需要的元素的方法。这就确保了元素不存在于那里。因此,为了使这种方法切实可行,二分搜索试图在列表中的某个位置搜索键,这有助于确定键必须存在于列表中该位置的哪一侧。所以二分搜索找到列表的中间位置,并将其与键进行比较。如果元素与键匹配,则返回 true,表示键在列表中找到。否则,它会检查元素,确定键必须在列表的哪一侧。基于此,算法消除另一半。并且它在每次迭代中都这样做。这就是每次迭代时,二分搜索消除列表一半的方式。所以通过消除一半,它花费 O(log n) 时间。
Implementation of Binary Search using Java-
使用 Java 实现二分搜索 -
public boolean binarySearch(int[] arr, int low, int high, key){
public boolean binarySearch(int[] arr, int low, int high, key){
//base case returns false when index is out of bound
//当索引超出范围时,基本情况返回false
if(low > high)
if(low > high)
return false;
返回 false;
int mid = (low+high)/2
int mid = (low+high)/2
//Searching on mid if key found then return true
//在中间位置搜索,如果找到键值则返回 true
if(arr[mid] == key)
if(arr[mid] == key)
return true
返回 true
//Searching on right sub array if key exist there
//在右侧子数组中搜索,如果键值存在
else if(arr[mid] < key)
else if(arr[mid] < key)
return binarySearch(arr, mid+1, high, key);
返回 binarySearch(arr, mid+1, high, key);
//Searching on left sub-array of key exist there.
//在左侧子数组中搜索,如果键值存在
else
else
return binarySearch(arr, low, mid-1, key);
返回 binarySearch(arr, low, mid-1, key);
}
928. Difference Between Left Join and Right Join in Database.
数据库中左连接和右连接之间的区别。
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Virtusa
- id: 69b37c8a58d557c902bc9421 | 官方: 否 | 付费: 否
答案:
The Left Join operator is used when you want to join two tables in which some columns have both primary and foreign keys. If the left table has a column that contains primary key values, then only those rows will be included in the result set of the query. If you do not specify a primary key column, then all rows will be included in the result set. A right join returns all rows in the right table that match any values in the left table. The left join returns all rows that match any values in the left table. The difference between Left Join and Right Join operators lies here as well. While the Left Join operator is used when tables have columns that support equality, the Right Join operator is used when tables have columns that do not support equality.
左连接运算符用于连接两个表,其中某些列同时具有主键和外键。如果左表包含主键值的列,则只有这些行才会包含在查询结果集中。如果未指定主键列,则所有行都将包含在结果集中。右连接返回右表中与左表任何值匹配的所有行。左连接返回左表中与任何值匹配的所有行。左连接和右连接运算符之间的区别也在于此。当表具有支持等值比较的列时,使用左连接运算符;而当表具有不支持等值比较的列时,使用右连接运算符。
929. What is the use of the ‘super’ keyword inside the constructor?
在构造函数中使用“super”关键字有什么用途?
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Virtusa
- id: 69b37c8a58d557c902bc942a | 官方: 否 | 付费: 否
答案:
The Super keyword in the constructor is used to invoke the parent class constructor. Generally when a subclass extends the parent class, and the parent class has a parameterized constructor. If we create the object of the child class then the default constructor of parent will be invoked implicitly. Since we need to initialize the object with some value, so we need to explicitly call it from the child class constructor using the super keyword.
构造函数中的 super 关键字用于调用父类的构造函数。通常,当子类继承父类,且父类具有参数化构造函数时,如果我们创建子类的对象,则父类的默认构造函数会被隐式调用。由于我们需要用某些值来初始化对象,因此需要使用 super 关键字从子类构造函数中显式调用它。
930. Tell me something about DHCP.
请告诉我一些关于 DHCP 的信息。
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Virtusa
- id: 69b37c8a58d557c902bc942d | 官方: 否 | 付费: 否
答案:
A Dynamic Host Configuration Protocol (DHCP) allows a device to automatically obtain an IP address and other network parameters from a DHCP server. This can be useful if you don’t want to manually assign IP addresses to devices on your network or if you have a large network and want to give each device a specific IP address. Many routers come with a built-in DHCP server, but it’s also possible to set up a DHCP server on your computer to assign IP addresses to devices on your network.
动态主机配置协议(DHCP)允许设备自动从DHCP服务器获取IP地址和其他网络参数。如果你不想手动为网络中的设备分配IP地址,或者你的网络规模很大并且希望为每台设备分配特定IP地址,这会很有用。许多路由器都内置了DHCP服务器,但你也可以在计算机上设置DHCP服务器,为网络中的设备分配IP地址。
931. Explain some drawbacks of the Classical Waterfall Model.
解释经典瀑布模型的一些缺点。
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Virtusa
- id: 69b37c8a58d557c902bc9433 | 官方: 否 | 付费: 否
答案:
There are several shortcomings to the classical waterfall model; we cannot use it in real projects, but we use other software development lifecycle models that are based on it. This model has the following major drawbacks: - There is no feedback path: In the classical waterfall model, software evolves from one phase to another. During any phase, developers are assumed not to commit any errors. Due to this, it does not incorporate a mechanism for correcting errors.
经典瀑布模型存在若干缺点;我们不能在真实项目中使用它,但我们会使用其他基于它的软件开发生命周期模型。该模型主要有以下缺点:- 没有反馈路径:在经典瀑布模型中,软件从一个阶段演进到另一个阶段。在任何阶段,都假定开发人员不会犯任何错误。因此,它没有包含纠正错误的机制。
- Change requests are difficult to accommodate: This model assumes all customer requirements can be determined upfront, but in reality, the requirements of customers keep changing over time. After the requirements specifications phase has been completed, it is difficult to accommodate any change requests.
- There is no overlapping of phases: This model recommends starting a new phase after the previous one is complete. However, in real projects, this cannot be maintained. Phases may overlap in order to increase efficiency and reduce costs.
932. Difference between set and list.
集(set)和列表(list)的区别。
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Virtusa
- id: 69b37c8a58d557c902bc9436 | 官方: 否 | 付费: 否
答案:
A list is an ordered collection of values where each value can be accessed using a numeric index. A set is an unordered collection of values that cannot be modified once created. The main difference between a set and a list is that lists are ordered (starting from 0), whereas sets are unordered.
列表是一个有序的值集合,其中每个值可以通过数字索引访问。集是一个无序的值集合,一旦创建便无法修改。集和列表的主要区别在于:列表是有序的(从0开始),而集是无序的。
There are several uses for sets: - They can be used to store information in a precise order, such as the days of the week, months of the year, or a list of phone numbers.
集有几种用途:- 它们可用于按精确顺序存储信息,例如一周中的天数、一年中的月份或电话号码列表。
- Sets can be used to preserve their original order when they are copied (e.g., when sharing files with someone who doesn't have the same software tools).
- They can be used to represent a finite population in which all members are unique (e.g., all people born in New York City).
- They can be used to represent random events in which all members have equal probability (e.g., rolling dice).
They can also be used to store specific instances of objects (e.g., all forks from your kitchen drawer).
These uses show that sets and lists both have different purposes and uses. As such, it is important to know the difference between them so that you can select the correct type for your application.这些用途表明集和列表都有不同的目的和用途。因此,了解它们之间的区别很重要,这样你才能为应用程序选择正确的类型。
933. What is Servlet?
什么是Servlet?
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Virtusa
- id: 69b37c8a58d557c902bc9442 | 官方: 否 | 付费: 否
答案:
A Servlet is a web application component that can be used to process incoming HTTP requests. Servlets are responsible for performing the logic that allows the web application to present its data to end-users and handle any required interactions with the database. Servlets can be written in a variety of programming languages, including Java, PHP, and Ruby. The most important thing to know about servlets is that they are defined by the use of Servlet API.
Servlet是一种Web应用程序组件,可用于处理传入的HTTP请求。Servlet负责执行逻辑,使Web应用程序能够向最终用户展示数据,并处理与数据库所需的任何交互。Servlet可以用多种编程语言编写,包括Java、PHP和Ruby。关于Servlet最重要的一点是,它们是通过使用Servlet API来定义的。
One way to think about a servlet is as an HTTP request handler - a part of your application that listens for incoming requests processes them and then returns the results to the client. In most cases, a servlet will have access to the same resources as other parts of your application; it might use these resources to display information or perform some processing on its own.
一种思考Servlet的方式是将其视为HTTP请求处理器——应用程序中监听传入请求、处理请求并将结果返回给客户端的一部分。在大多数情况下,Servlet可以访问与应用程序其他部分相同的资源;它可能使用这些资源来显示信息或自行执行某些处理。
934. You are given an array of numbers and a target number. You are required to return the index of 2 numbers such that adding the element of the index will sum to the target.
给你一个数字数组和一个目标数字。你需要返回两个数字的索引,使得这两个索引处的元素相加等于目标值。
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Virtusa
- id: 69b37c8b58d557c902bc944e | 官方: 否 | 付费: 否
答案:
You may assume that there must be a solution exist. Example - arr = [2,9,1,3,4] target = 12 Output = [1,3]
你可以假定必定存在一个解。示例 - arr = [2,9,1,3,4] target = 12 输出 = [1,3]
The naive solution can be to pick every element and find the element that sums up to target. This approach can take time of O(n2) . So we can observe that we are repeating the work by revising the index every time. So we can do one thing we can store the index of the element that we already visited in HashMap. And next whenever the element that is required to sum to target that we can get from the Hashmap. So with this approach, we can do this work in O(n) time.
朴素的解法可以是选取每个元素,并找到与之相加等于目标值的元素。这种方法的时间复杂度为O(n2)。因此我们可以观察到,每次重新访问索引会重复工作。所以我们可以做一件事:将已经访问过的元素的索引存储在HashMap中。然后在后续过程中,每当需要查找与当前元素相加等于目标值的元素时,我们可以从HashMap中获取。因此,通过这种方法,我们可以在O(n)时间内完成这项工作。
//This method returns the index of the two-element that sum to the target.
//此方法返回两个相加等于目标值的元素的索引。
public int[] solution(int[] nums, int target) {
public int[] solution(int[] nums, int target) {
int val = 0;
int val = 0;
// HashMap that stores the index of the element that are required
// HashMap,用于存储构成目标和的元素的索引
// to sum to target
// 求和为目标值所需的元素
HashMap<Integer, Integer> hm = new HashMap<>();
HashMap<Integer, Integer> hm = new HashMap<>();
hm.put(nums[0], 0);
hm.put(nums[0], 0);
for(int i = 1; i < nums.length; i++){
for(int i = 1; i < nums.length; i++){
val = target - nums[i];
val = target - nums[i];
//Returning the solution of the element found.
//返回找到元素的解决方案。
if(hm.containsKey(val)){
if(hm.containsKey(val)){
return new int[]{hm.get(val), i};
return new int[]{hm.get(val), i};
}
// Adding the element to the hashmap so that it may be needed
// 将元素添加到hashmap中,以便后续可能用到
// for future element
// 用于未来的元素
hm.put(nums[i], i);
hm.put(nums[i], i);
}
return new int[]{0,0};
return new int[]{0,0};
}
Virtusa Interview Preparation
935. Is virtusa interview difficult?
Virtusa面试难吗?
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Virtusa
- id: 69b37c8b58d557c902bc948e | 官方: 否 | 付费: 否
答案:
The Virtusa interview is not difficult to clear. But if you haven’t prepared well, then obviously it will be difficult to clear. The interviewer usually sees your confidence. Be well prepared for the important topics listed in the above sections. And the other is your project. How well you're prepared to answer questions related to it.
Virtusa面试并不难通过。但如果你没有充分准备,那么显然会很难通过。面试官通常会看重你的自信心。要充分准备上文列出的重要主题。另外就是你的项目,以及你对相关问题的回答准备得如何。
936. Why do you want to join our company?
你为什么想加入我们公司?
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Virtusa
- id: 69b37c8b58d557c902bc9491 | 官方: 否 | 付费: 否
答案:
There can be many possibly best answers to this question that you have to take care of. By asking these questions, the interviewer often wants to see your interest in the organization. They expect that you give a unique answer, not by just learning the best from the internet. So for this, try to research about the company and understand everything about the work culture for your profile that you are selected for and answer this question with curiosity and your answer must convey to the interviewer that you feel excited to work for the company.
对于这个问题,可能有很多最佳答案,你需要谨慎对待。通过提出这些问题,面试官通常想看到你对组织的兴趣。他们期望你给出独特的答案,而不是仅仅从网上学习最好的答案。因此,为此,尝试研究公司,了解针对你被选中的职位的工作文化的一切,并以好奇心回答这个问题,你的答案必须向面试官传达你为该公司工作感到兴奋。
937. How to explain the project in the interview?
如何在面试中讲解项目?
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Virtusa
- id: 69b37c8b58d557c902bc94a4 | 官方: 否 | 付费: 否
答案:
Project discussion in the interview is very important. Using your project, the interviewer basically wants to know more about your skills. How well you have utilized the technology to solve any real-world problem using your project. So whenever you start to explain your project, always start with how the idea came into your mind and what motivated you to build the project. Next, explain how your project can be extended further and help in solving the real-world problem. Then explain to the interviewer about the technology that you have opted to build the project and the reason why you have chosen the technology. Also, explain a one-liner about the technology and its alternatives. Conclude your project by explaining the high-level view and the data flow. If the interviewer asks more about this, then you have to explain the low-level design of your project.
面试中的项目讨论非常重要。通过你的项目,面试官基本上想更了解你的技能,以及你如何利用技术通过项目解决现实世界问题。因此,每当你开始讲解项目时,始终从想法如何进入你的脑海以及是什么激励你构建项目开始。接下来,解释你的项目如何能进一步扩展并帮助解决现实世界问题。然后向面试官解释你选择构建项目的技术以及选择该技术的原因。此外,用一句话解释该技术及其替代方案。最后通过解释高层视图和数据流来总结你的项目。如果面试官询问更多细节,那么你必须解释项目的低层设计。
938. How long is the Virtusa interview?
Virtusa面试时长是多少?
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Virtusa
- id: 69b37c8b58d557c902bc94a7 | 官方: 否 | 付费: 否
答案:
Generally, the interview will be the duration of 1 hour to 1.5 hours . But in some cases, it can be extended up to 2 hours depending on how well you are answering and the interviewer decides to hire you based on your explanation and your knowledge. The total selection process in Virtusa will be between 10 - 20 days that you will get the offer.
一般情况下,面试时长为1小时到1.5小时。但在某些情况下,根据你的回答表现以及面试官根据你的解释和知识决定是否录用你,面试可能延长至2小时。Virtusa的整个选拔过程将在10到20天之间,之后你会收到录用通知。
939. What is the Eligibility Criteria at Virtusa?
Virtusa的资格标准是什么?
- 知识点: 其他/未分类 (标签: interviewbit, virtusa, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Virtusa
- id: 69b37c8c58d557c902bc94aa | 官方: 否 | 付费: 否
答案:
- Course Eligibility: B.E./B.Tech/MCA/M.Tech/M.E./M.Sc (IT).
- Backlog: No active backlog during Joining.
- Percentage Criteria: 65% / 6.5 GPA or Above.
940. Given an array of n elements, where each element is at most k away from its target position, return the sorted array.
给定一个n个元素的数组,其中每个元素距离其目标位置最多k个位置,返回排序后的数组。
- 知识点: 其他/未分类 (标签: interviewbit, walmart, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 沃尔玛
- id: 69b37c8f58d557c902bc96a8 | 官方: 否 | 付费: 否
答案:
Example: Input: array[] = {5, 6, 3, 2, 8, 9, 10} k = 3 Output: array[] = {2, 3, 5, 6, 8, 9, 10}
示例:输入:array[] = {5, 6, 3, 2, 8, 9, 10} k = 3 输出:array[] = {2, 3, 5, 6, 8, 9, 10}
Input: array[] = {10, 9, 8, 4, 7, 70, 50, 60} k = 4 Output: array[] = {4, 7, 8, 9, 10, 50, 60, 70}
输入:array[] = {10, 9, 8, 4, 7, 70, 50, 60} k = 4 输出:array[] = {4, 7, 8, 9, 10, 50, 60, 70}
Approach 1:
方法一:
In this approach, we will use insertion sort to sort the array. Since it is given that each element of the given array is utmost k positions away from its original position, the inner loop of the insertion sort will run utmost k times.
在此方法中,我们将使用插入排序对数组进行排序。由于给定数组中每个元素距离其原始位置最多k个位置,因此插入排序的内循环最多运行k次。
Code:
代码:
void sortArray(int arr[], int size, int k)
void sortArray(int arr[], int size, int k)
{
int i, key, j;
int i, key, j;
for (i = 1; i < size; i++)
for (i = 1; i < size; i++)
{
key = arr[i];
key = arr[i];
j = i-1;
j = i-1;
/* We move the elements of arr[0..i-1], that are
/* 我们将arr[0..i-1]中那些
greater than key, to one
大于key的元素移动到
position ahead of their current position.
它们当前位置之前的一个位置。
This loop will run at most k times */
此循环最多运行k次 */
while (j >= 0 && arr[j] > key)
while (j >= 0 && arr[j] > key)
{
arr[j+1] = arr[j];
arr[j+1] = arr[j];
j = j-1;
j = j-1;
}
arr[j+1] = key;
arr[j+1] = key;
}
}
Explanation:
说明:
In the above code, the function sortArray takes the input of an array, its size and k as input, and returns the sorted array. The inner loop runs utmost k times since it is given in the problem statement that each element of the given array is utmost k positions away from its sorted position. So, the time complexity of this approach is O(nk), where n is the size of the array.
在上述代码中,函数 sortArray 接收数组、其大小和 k 作为输入,并返回排序后的数组。内层循环最多运行 k 次,因为问题描述中给出了该数组的每个元素离其排序后的位置最多相差 k 个位置。因此,这种方法的时间复杂度为 O(nk),其中 n 是数组的大小。
Approach 2:
方法 2:
In this approach, we use the heap data structure to solve the problem more efficiently. With the first k+1 elements, we make a Min Heap of size k+1. This will take O(k) time. We then remove the min element from the heap one by one, place them in the result array, and add a new element to the heap from the remaining elements. It will take O(log k) time to remove an element and add a new element to the min-heap. As a result, the total complexity will be O(k) + O(n-k) * log(k).
在这种方法中,我们使用堆数据结构来更高效地解决问题。使用前 k+1 个元素,我们构建一个大小为 k+1 的最小堆。这将花费 O(k) 时间。然后,我们逐一从堆中移除最小元素,将它们放入结果数组中,并从剩余元素中向堆添加一个新元素。从最小堆中移除一个元素并添加一个新元素将花费 O(log k) 时间。因此,总复杂度将为 O(k) + O(n-k) * log(k)。
Code:
代码:
include <bits/stdc++.h>
using namespace std;
using namespace std;
int sortArray(int arry[], int n, int k)
int sortArray(int arry[], int n, int k)
{
int size;
int size;
size = (n==k) ? k : k+1; //When the size of array is k itself, we insert k elements to the heap else we insert k + 1 elements
size = (n==k) ? k : k+1; //当数组大小本身为 k 时,我们向堆中插入 k 个元素,否则插入 k + 1 个元素
priority_queue<int, vector, greater > p_queue(arry, arry +size); // Min heap
priority_queue<int, vector, greater > p_queue(arry, arry +size); // 最小堆
// i is index for remaining elements in arr[] and index is target index of current minimum element in Min Heap 'pq'.
// i 是 arr[] 中剩余元素的索引,index 是 Min Heap 'pq' 中当前最小元素的目标索引。
int index = 0;
int index = 0;
for (int i = k + 1; i < n; i++) {
for (int i = k + 1; i < n; i++) {
arry[index++] = p_queue.top();
arry[index++] = p_queue.top();
p_queue.pop();
p_queue.pop();
p_queue.push(arry[i]);
p_queue.push(arry[i]);
}
while (p_queue.empty() == false) {
while (p_queue.empty() == false) {
arry[index++] = p_queue.top();
arry[index++] = p_queue.top();
p_queue.pop();
p_queue.pop();
}
}
// A function to print the array elements
// 用于打印数组元素的函数
void showArray(int arry[], int size)
void showArray(int arry[], int size)
{
for (int i = 0; i < size; i++)
for (int i = 0; i < size; i++)
cout << arry[i] << " ";
cout << arry[i] << " ";
cout << “\n”;
cout << “\n”;
}
// main function to call the above functions
// 主函数用于调用上述函数
int main()
int main()
{
int k = 4;
int k = 4;
int arry[] = { 10, 9, 8, 4, 7, 70, 50, 60};
int arry[] = { 10, 9, 8, 4, 7, 70, 50, 60};
int n = sizeof(arry) / sizeof(arry[0]);
int n = sizeof(arry) / sizeof(arry[0]);
sortArray(arry, n, k);
sortArray(arry, n, k);
cout << "The sorted array is as follows:" << endl;
cout << "排序后的数组如下:" << endl;
showArray(arry, n);
showArray(arry, n);
return 0;
return 0;
}
Output:
输出:
The sorted array is as follows:
排序后的数组如下:
4 7 8 9 10 50 60 70
Explanation:
说明:
In the above code, the function sortArray takes the input of the array, its size and k. We create a min-heap of size k + 1 and iterate over the remaining elements one by one. We extract the min element from the heap in each iteration and remove it from the heap.
在上述代码中,函数sortArray接收数组、其大小和k作为输入。我们创建一个大小为k + 1的最小堆,并逐一遍历剩余元素。在每次迭代中,我们从堆中提取最小元素并将其从堆中移除。
Useful Resources
有用资源
- Data Science Interview Questions
- Java Interview Questions
- Data Engineer Interview Questions
- Software Engineering Interview Questions
- Front End Developer Interview Questions
- Technical Interview Questions
- Coding Interview Questions
941. How can we calculate 45 minutes with two identical wires that each take an hour to burn? We've got matchsticks on hand. The wires burn in a non-uniform manner. The two halves of wire, for example, could burn in 10 minutes and 50 minutes, respectively.
我们如何用两根相同的、每根需要一小时才能烧完的导线来计算45分钟?我们手头有火柴。导线的燃烧方式不均匀。例如,导线的两半可能分别燃烧10分钟和50分钟。
- 知识点: 其他/未分类 (标签: interviewbit, walmart, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 沃尔玛
- id: 69b37c8f58d557c902bc96b1 | 官方: 否 | 付费: 否
答案:
It takes 60 minutes to thoroughly burn a stick if we light it. What if we light both sides of the stick? It will take exactly half the time to burn fully, i.e. 30 minutes.
如果我们点燃一根棒,它需要60分钟才能完全烧完。如果我们点燃棒的两端呢?它将恰好用一半的时间完全烧完,即30分钟。
At 0 minutes : We start with lighting Stick 1 on both sides and Stick 2 on one side.
在0分钟时:我们开始同时点燃第一根棒的两端和第二根棒的一端。
At 30 minutes: Stick 1 will be completely burnt out. Now we light the other end of the stick 2 as well.
在30分钟时:第一根棒将完全烧尽。现在我们点燃第二根棒的另一端。
At 45 minutes: Stick 2 will be completely burnt out. This will mark the completion of the required 45 minutes.
在45分钟时:第二根棒将完全烧尽。这将标志着所需的45分钟完成。
942. What do you understand about preprocessors in the context of C programming language? What are the different types of preprocessor directives?
在C编程语言中,你对预处理器有什么了解?有哪些不同类型的预处理器指令?
- 知识点: 其他/未分类 (标签: interviewbit, walmart, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: 沃尔玛
- id: 69b37c9058d557c902bc96b7 | 官方: 否 | 付费: 否
答案:
Preprocessors, as the name implies, are programs that process our source code before compilation. The file program.c contains the source code written by programmers. This file is then preprocessed, and an enlarged source code file named program is generated. The compiler compiles this expanded file and creates an object code file named program .obj. Finally, the linker creates the executable file program.exe by linking this object code file to the object code of the library functions.
预处理器,顾名思义,是在编译之前处理我们源代码的程序。文件program.c包含程序员编写的源代码。这个文件随后被预处理,生成一个名为program的扩大源代码文件。编译器编译这个扩展文件并创建一个名为program .obj的目标代码文件。最后,链接器通过将这个目标代码文件与库函数的目标代码链接来创建可执行文件program.exe。
The following are the different types of preprocessors directives: - Macros: A macro is a piece of code in a program that has a name. The compiler substitutes this name with the real piece of code whenever it encounters this name. To define a macro, use the '#define' directive. Let's look at a program to assist us to grasp what a macro is:
以下是不同类型的预处理器指令:- 宏:宏是程序中具有名称的一段代码。每当编译器遇到这个名称时,它会用真正的代码段替换它。要定义一个宏,请使用“#define”指令。让我们看一个程序来帮助理解什么是宏:
include <stdio.h>
// macro definition
// 宏定义
define LIMIT 5
int main()
int main()
{
for (int i = 0; i < LIMIT; i++) {
for (int i = 0; i < LIMIT; i++) {
printf("%d \n",i);
printf("%d \n",i);
}
return 0;
return 0;
}
In the above code, a macro “LIMIT” has been defined with 5. Whenever the compiler encounters the macro “LIMIT”, it substitutes it with 5. Hence, in the above code, the for loop runs five times. - File Inclusion: A preprocessor directive that instructs the compiler to include a file in the source code program. There are two categories of files that a user can incorporate into the program:
在上述代码中,定义了一个宏“LIMIT”,其值为5。每当编译器遇到宏“LIMIT”时,就会用5来替换它。因此,在上述代码中,for循环会运行五次。- 文件包含:一种预处理指令,指示编译器在源代码程序中包含一个文件。用户可以将两类文件纳入程序中:
Header files: Header files, often known as standard files, contain the definitions of pre-defined functions such as printf() and scanf(). These files must be present in order to use these functionalities.
头文件:头文件通常被称为标准文件,包含预定义函数(如printf()和scanf())的定义。要使用这些功能,这些文件必须存在。
user-defined files: When a programme grows too big, it's a good idea to break it down into smaller files and include them as needed. These are referred to as user-defined files. - Conditional Compilation: Conditional Compilation directives are a form of directive that allows you to compile or omit the compilation of a specific segment of the program based on certain criteria. The preprocessing commands 'ifdef' and 'endif' can be used to accomplish this.
用户定义文件:当程序变得过大时,最好将其拆分为更小的文件,并按需包含它们。这些文件被称为用户定义文件。- 条件编译:条件编译指令是一种指令形式,允许您根据特定条件编译或省略程序中特定段的编译。预处理命令'ifdef'和'endif'可用于实现此目的。
943. What do you understand by wild pointers? How can that be avoided?
你对野指针有什么理解?如何避免野指针?
- 知识点: 其他/未分类 (标签: interviewbit, walmart, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 沃尔玛
- id: 69b37c9058d557c902bc96c0 | 官方: 否 | 付费: 否
答案:
Wild pointers are uninitialized pointers that point to any arbitrary memory location, potentially causing a program to crash or behave improperly.
野指针是未初始化的指针,指向任意的内存位置,可能导致程序崩溃或行为异常。
Example - Let us consider the following C program:
示例-让我们考虑以下C程序:
int main()
int main()
{
int *temp_pointer; // A wild pointer
int *temp_pointer; // 一个野指针
*temp_pointer = 12; // This corrupts an unknown memory location. This should never be done.
*temp_pointer = 12; // 这会破坏一个未知的内存位置。绝不能这样做。
}
In the above example, no memory location is defined for the pointer “temp_pointer” and hence it is a wild pointer. Any random memory location will be assigned to such a pointer and this may corrupt the data present previously on that memory location.
在上述示例中,没有为指针“temp_pointer”定义任何内存位置,因此它是一个野指针。任何随机的内存位置都会被分配给这样的指针,这可能会破坏该内存位置上先前存在的数据。
To avoid this, if we want to declare a pointer and we do not have a variable to which we can point the pointer, we can do the following:
为避免这种情况,如果我们想声明一个指针,但又没有变量可以指向该指针,我们可以这样做:
int main()
int main()
{
int temp_pointer = (int )malloc(sizeof(int)); // Not a wild pointer
int temp_pointer = (int )malloc(sizeof(int)); // 不是野指针
*temp_pointer = 12; // This is fine assuming malloc doesn't return NULL
*temp_pointer = 12; // 假设malloc不返回NULL,这是可以的
}
In the above example, we made the pointer “temp_pointer” point to a memory location explicitly allocated for the pointer. This eliminates the risk of corrupting any random memory location.
在上面的例子中,我们让指针“temp_pointer”指向一个为指针显式分配的内存位置。这消除了破坏任何随机内存位置的风险。
944. What do you understand by memory leak? How can that be avoided?
你对内存泄漏的理解是什么?如何避免它?
- 知识点: 其他/未分类 (标签: interviewbit, walmart, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 沃尔玛
- id: 69b37c9058d557c902bc96c3 | 官方: 否 | 付费: 否
答案:
When programmers create a heap memory and forget to destroy it, a memory leak develops. The result of a memory leak is that the computer's performance suffers as the amount of usable memory is reduced. In the worst-case scenario, too much of the available memory may be allocated, causing all or part of the system or device to stop working properly, the programme to fail, or the system to significantly slow down. Memory leaks are especially problematic for applications like daemons and servers, which are never terminated by definition.
当程序员创建堆内存但忘记销毁它时,就会发生内存泄漏。内存泄漏的结果是,由于可用内存减少,计算机性能会受到影响。在最坏的情况下,可能分配过多可用内存,导致系统或设备的全部或部分停止正常工作、程序失败,或系统显著变慢。内存泄漏对于守护进程和服务器等从不终止的应用程序尤其成问题。
To avoid memory leaks , heap memory should always be destroyed when it is no longer required.
为避免内存泄漏,当堆内存不再需要时应始终销毁它。
945. What are the eligibility criteria for a job interview at Walmart?
沃尔玛面试的资格标准是什么?
- 知识点: 其他/未分类 (标签: interviewbit, walmart, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 沃尔玛
- id: 69b37c9058d557c902bc970a | 官方: 否 | 付费: 否
答案:
The eligibility criteria for a job interview at Walmart generally include the following: - Educational Qualification: BE/B.Tech/ME/M.Tech - CSE, IT, ECE.
沃尔玛面试的资格标准通常包括以下内容:- 学历要求:BE/B.Tech/ME/M.Tech - 计算机科学、信息技术、电子与通信工程。
- 60% or 6.5 GPA and above throughout without any running backlogs.
946. What is the package of Walmart in India?
沃尔玛在印度的薪资待遇是多少?
- 知识点: 其他/未分类 (标签: interviewbit, walmart, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 沃尔玛
- id: 69b37c9058d557c902bc970d | 官方: 否 | 付费: 否
答案:
The average salary for a fresher software engineer at Walmart is around 22 lakhs to 25 lakhs per annum. The average salary for an experienced software engineer at Walmart can range from 35 lakhs to 50 lakhs per annum depending on the years of experience in software engineering.
沃尔玛初级软件工程师的平均年薪约为22万至25万卢比。经验丰富的软件工程师的平均年薪可能在35万至50万卢比之间,具体取决于软件工程的工作年限。
947. What Is Is Walmart easy to get hired??
沃尔玛容易入职吗??
- 知识点: 其他/未分类 (标签: interviewbit, walmart, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 沃尔玛
- id: 69b37c9058d557c902bc9710 | 官方: 否 | 付费: 否
答案:
CodeHers is a coding contest organised by Walmart for women candidates only. Walmart hires for various job openings through this program. Walmart aims to empower women in technology through this initiative.
CodeHers是沃尔玛专为女性候选人组织的编程竞赛。沃尔玛通过此项目招聘各种职位。沃尔玛旨在通过这一举措赋能女性在技术领域的发展。
948. Why should we choose you?
为什么我们应该选择你?
- 知识点: 其他/未分类 (标签: interviewbit, walmart, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 沃尔玛
- id: 69b37c9058d557c902bc9713 | 官方: 否 | 付费: 否
答案:
This is again a behavioural question. Here the interviewer wants to assess whether or not you understand the responsibilities of the job position and how you think that you will be a great match for the job opening. The interviewer wants to assess how confident you are while answering this question. While answering this question, you can mention the following points: - Demonstrate that you have the necessary abilities and expertise to do the job well. You never know what other applicants can bring to the table. But you know yourself: highlight your essential abilities, strengths, talents, job experience, and professional accomplishments that are critical to achieving exceptional results in this role.
这又是一个行为问题。在这里,面试官想评估你是否了解该职位的工作职责,以及你认为自己如何能很好地匹配这个职位空缺。面试官想评估你回答这个问题时的信心。回答这个问题时,你可以提到以下几点:- 展示你具备做好这项工作所需的能力和专业知识。你永远不知道其他候选人能带来什么。但你了解自己:突出你对在该职位取得卓越成果至关重要的核心能力、优势、才能、工作经验和专业成就。
- Emphasise how you'll fit in and contribute to the team. Demonstrate to the interviewer that you have the necessary personal and professional qualities to be a valuable member of the team.
- Demonstrate excitement for the work at hand, not simply competence. Your application shows that you're willing to put in the effort. The fact that you've been invited for an interview indicates that they believe you're capable. Show them your passion in addition to your abilities and expertise to demonstrate that you will approach your responsibilities with a positive attitude.
949. What do I need to know for a Walmart interview?
沃尔玛面试我需要了解什么?
- 知识点: 其他/未分类 (标签: interviewbit, walmart, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 沃尔玛
- id: 69b37c9058d557c902bc9716 | 官方: 否 | 付费: 否
答案:
You must be clear in your understanding of all the technical skills that you have mentioned in your resume. You can definitely expect questions on that and so be well prepared for it. You must be well-versed in Data Structures and Algorithms and their applications. You can expect questions similar to what we have mentioned in the article above. Make sure that you are confident in all of the above topics and that you are good to go for the interview.
你必须清楚理解简历中提到的所有技术技能。你肯定可以预期会问到这些问题,所以要好好准备。你必须精通数据结构和算法及其应用。你可以预期会遇到类似于我们上文提到的问题。确保你对以上所有主题充满信心,就可以去参加面试了。
950. Why do you want to work in Walmart?
你为什么想在沃尔玛工作?
- 知识点: 其他/未分类 (标签: interviewbit, walmart, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 沃尔玛
- id: 69b37c9058d557c902bc9719 | 官方: 否 | 付费: 否
答案:
This is a behavioural question. Here, the interviewer wants to assess your desire and your motive to join the company. You should clearly state what motivates you to join Walmart and how you see yourself growing while working at Walmart. You can also state the benefits that the employees at Walmart get and this could be one of your motivations to join the company.
这是一个行为问题。在这里,面试官想要评估你加入公司的愿望和动机。你应该清楚说明是什么激励你加入沃尔玛,以及你如何看待自己在沃尔玛工作期间的成长。你还可以说明沃尔玛员工获得的福利,这可能也是你加入公司的动机之一。
951. What are Walmart Labs?
什么是沃尔玛实验室?
- 知识点: 其他/未分类 (标签: interviewbit, walmart, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 沃尔玛
- id: 69b37c9058d557c902bc971c | 官方: 否 | 付费: 否
答案:
Walmart Labs (previously known as Kosmix and @WalmartLabs) was acquired by Walmart Global Tech, the company's technology and business services division. Kosmix was founded in 2005 by Venky Harinarayan and Anand Rajaraman. Walmart bought Kosmix in April 2011 and turned it into @WalmartLabs, a research branch. Walmart Technology was formed in 2006 when Walmart Labs and its information systems division (ISD) were merged into one team. Walmart Technology rebranded as Walmart Global Tech in August 2020 as part of the world's largest retailer's new technology and shared services organisation.
沃尔玛实验室(之前称为Kosmix和@WalmartLabs)被沃尔玛全球技术部门(公司的技术和业务服务部门)收购。Kosmix由文基·哈里纳拉扬和阿南德·拉贾拉曼于2005年创立。沃尔玛于2011年4月收购了Kosmix,并将其转变为研究分支@WalmartLabs。沃尔玛技术部门成立于2006年,当时沃尔玛实验室及其信息系统部门(ISD)合并为一个团队。沃尔玛技术部门于2020年8月更名为沃尔玛全球技术,作为这家全球最大零售商新的技术和共享服务组织的一部分。
952. How do I prepare for an internship at Walmart?
我如何为在沃尔玛实习做准备?
- 知识点: 其他/未分类 (标签: interviewbit, walmart, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 沃尔玛
- id: 69b37c9058d557c902bc971f | 官方: 否 | 付费: 否
答案:
To prepare for an i nternship interview at Walmart : - Be proficient in at least one of the modern programming languages such as C, C++, Java and Python.
为准备沃尔玛实习面试:- 至少精通一种现代编程语言,如C、C++、Java和Python。
- Have a strong understanding of the different data structures and you must be familiar with the popular and well-known algorithms. You should be clear with the applications of the various data structures. You should also be able to differentiate between the various data structures.
- Have a strong knowledge of the CS fundamentals subjects such as Object-Oriented Programming Systems (OOPs), DataBase Management Systems (DBMS), Computer Networks (CN) and Operating Systems (OS).
- Consider giving a mock interview before the actual interview. This will give you a simulation of the actual interview and you can improve on your shortcomings based on the feedback provided from the mock interview.
953. Is it easy to get hired at Walmart?
在沃尔玛被录用容易吗?
- 知识点: 其他/未分类 (标签: interviewbit, walmart, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 沃尔玛
- id: 69b37c9058d557c902bc9722 | 官方: 否 | 付费: 否
答案:
The hiring process at Walmart is thorough. Walmart assesses a candidate thoroughly before making a hiring decision. That being said, one can say that it is not that easy to crack a job at Walmart. However, with the right preparation and guidance, nothing is difficult and you can surely crack a job at Walmart.
沃尔玛的招聘过程很彻底。沃尔玛在做出录用决定之前会全面评估候选人。话虽如此,可以说在沃尔玛获得一份工作并不那么容易。然而,只要有正确的准备和指导,没有什么是困难的,你肯定能在沃尔玛获得一份工作。
954. How do I ace a Walmart interview?
我如何才能在沃尔玛面试中表现出色?
- 知识点: 其他/未分类 (标签: interviewbit, walmart, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 沃尔玛
- id: 69b37c9058d557c902bc9725 | 官方: 否 | 付费: 否
答案:
To ace, a Walmart Interview, make sure that you have a strong understanding of the CS fundamentals subjects like Object-Oriented Programming Systems (OOPs), DataBase Management Systems (DBMS), Computer Networks (CN), Operating Systems (OS) and Data Structures and Algorithms (DSA). Also, make sure to have a strong understanding of whatever you mention in your resume. You can be asked questions on that, so be prepared for it. At last, be confident and believe in yourself. You will surely excel in the interview.
要在沃尔玛面试中表现出色,请确保你对计算机科学基础学科有扎实的理解,如面向对象编程系统(OOPs)、数据库管理系统(DBMS)、计算机网络(CN)、操作系统(OS)以及数据结构与算法(DSA)。此外,确保你对简历中提到的任何内容都有扎实的理解。你可能会被问到相关问题,所以要做好准备。最后,要自信并相信自己。你一定会在面试中表现出色。
Coding Problems
0/1
Intermediate Problems
中级问题
Arrays
数组
First Missing Integer
第一个缺失的正整数
Medium
中等
64.38 Mins
64.38分钟
Solve
解答
955. Describe the main differences between the LocalStorage and SessionStorage objects in context to HTML.
描述HTML上下文中LocalStorage和SessionStorage对象的主要区别。
- 知识点: 其他/未分类 (标签: interviewbit, wipro, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Wipro
- id: 69b37c9858d557c902bc9b70 | 官方: 否 | 付费: 否
答案:
The following are the main distinctions between localStorage and sessionStorage objects: - The data stored in the localStorage object has no expiration date. The sessionStorage object, on the other hand, keeps data for a single session.
以下是localStorage和sessionStorage对象之间的主要区别:- localStorage对象中存储的数据没有过期日期。另一方面,sessionStorage对象仅保留单个会话的数据。
- When a browser window is closed, data in a localStorage object is not deleted. In the case of sessionStorage objects, however, the data is destroyed when the browser window is closed.
- SessionStorage data is only available in the browser's current window. The data in the localStorage, on the other hand, can be shared across several browser windows.
956. What makes a macro faster than a function in the C programming language?
在C编程语言中,什么使宏比函数更快?
- 知识点: 其他/未分类 (标签: interviewbit, wipro, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Wipro
- id: 69b37c9858d557c902bc9b79 | 官方: 否 | 付费: 否
答案:
Macros are sections of code in a programme that have been given a name. The compiler substitutes this name with the real piece of code whenever it encounters this name. To define a macro, use the '#define' directive. Macros can be defined either before or within the main method.
宏是程序中已被命名的代码段。每当编译器遇到此名称时,它会用实际的代码段替换此名称。要定义宏,请使用'#define'指令。宏可以在主方法之前或内部定义。
Code 1:
代码1:
//C
//C
include<stdio.h>
include<conio.h>
define HRS 24 //Macro
int main()
int main()
{
printf("%d", HRS);
printf("%d", HRS);
return 0;
return 0;
}
Output:
输出:
24
Explanation:
说明:
In the above code, we defined a macro named HRS to have a value of 24. Now, when we call the macro in the printf function, 24 gets printed in the output terminal.
在上述代码中,我们定义了一个名为 HRS 的宏,其值为 24。现在,当我们在 printf 函数中调用该宏时,输出终端会打印出 24。
The above code can be inferred to be the following code without the use of macros.
上述代码可被理解为不使用宏时的以下代码。
Code 2:
代码 2:
//C
//C
include<stdio.h>
int hrs()
int hrs()
{
return 24;
return 24;
}
int main()
int main()
{
printf("%d", hrs()); //calling
printf("%d", hrs()); //调用
return 0;
return 0;
}
Output :
输出:
24
Explanation:
说明:
Here, we defined a function named HRS. When we call the HRS function in the printf function, the function returns 24 and so 24 is printed on the output terminal.
这里,我们定义了一个名为 HRS 的函数。当我们在 printf 函数中调用 HRS 函数时,该函数返回 24,因此输出终端会打印出 24。
Macros are pre-processed, which implies that all macros are processed before the code is compiled, and functions are processed after the code is compiled.
宏会进行预处理,这意味着所有宏都会在代码编译之前被处理,而函数则是在代码编译之后被处理。
957. Explain Aggregation vs Composition in Java.
在Java中解释聚合与组合的区别。
- 知识点: 其他/未分类 (标签: interviewbit, wipro, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Wipro
- id: 69b37c9858d557c902bc9b85 | 官方: 否 | 付费: 否
答案:
An association is a relationship that exists between two distinct classes and is established through their Objects. One-to-one, one-to-many, many-to-one, and many-to-many associations are all possible.
关联是两个不同类之间通过它们的对象建立的一种关系。一对一、一对多、多对一和多对多关联都是可能的。
An Object communicates with other Objects to leverage the capabilities and services provided by that object in Object-Oriented programming. Association has two forms and they are composition and aggregation.
在面向对象编程中,一个对象与其他对象通信以利用该对象提供的功能和服务。关联有两种形式,即组合和聚合。
Aggregation is a unique type of association in which: - It denotes a Has-A relationship.
聚合是一种特殊的关联类型,其中:- 它表示一种Has-A(具有)关系。
- It's a one-way relationship or a unidirectional association.
- In Aggregation, both entries can persist independently, implying that terminating one entity will have no influence on the other.
In the above image, we can clearly see that each teacher is associated with a college, and each student is also associated with a college. Thus, both the entities, the student and the teacher can exist independently.
在上图中,我们可以清楚地看到每位教师与一所学院相关联,每位学生也与一所学院相关联。因此,学生和教师这两个实体都可以独立存在。
Composition is a type of Aggregation in which two entities are extremely reliant on one another. - It denotes a part-of-relationship.
组合是聚合的一种类型,其中两个实体彼此极度依赖。- 它表示一种部分-整体关系。
- Both entities are reliant on one another in composition.
- When two entities come together to form a composition, the composite object cannot exist without the other.
In the above image, we can clearly see that both Tyre and Engine form an integral part of a vehicle. Both are reliant on each other. Without either of them, the Vehicle entity is useless.
在上图中,我们可以清楚地看到轮胎和引擎都是车辆不可或缺的组成部分。两者相互依赖。缺少其中任何一个,车辆实体都是无用的。
958. Differentiate between strings and char arrays in Java.
区分Java中的字符串和字符数组。
- 知识点: 其他/未分类 (标签: interviewbit, wipro, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Wipro
- id: 69b37c9858d557c902bc9b8b | 官方: 否 | 付费: 否
答案:
| Strings 字符串 | Character Arrays 字符数组 |
|---|---|
| A string is a sequential collection of characters that are represented as a single data type. 字符串是按顺序排列的字符集合,表示为单一数据类型。 | A Character Array is a collection of char data types in sequential order. 字符数组是按顺序排列的字符数据类型集合。 |
| Strings are immutable which means the data or state of a String object can't be modified once it has been created; instead, a new String object is generated. 字符串是不可变的,这意味着一旦创建,字符串对象的数据或状态就不能被修改;相反,会生成一个新的字符串对象。 | Character Arrays are mutable which means the contents of a char array can be changed. 字符数组是可变的,这意味着字符数组的内容可以被更改。 |
| Strings can be used with built-in functions like substring() and charAt(). 字符串可以使用内置函数,如substring()和charAt()。 | In Java, there are no built-in functions for working with Character Arrays. 在Java中,没有用于字符数组的内置函数。 |
| The '+' operator can be used to join two strings together to generate a new one. '+'运算符可以用于将两个字符串连接起来生成一个新的字符串。 | Appending two Character Arrays with '+' is not possible. 使用'+'将两个字符数组连接起来是不可能的。 |
| The charAt() method is used to access characters in a String at a specific index. charAt()方法用于访问字符串中特定索引处的字符。 | [] can be used to access the characters in a Character Array in the same way it can in any other language. []可以用于访问字符数组中的字符,方式与任何其他语言相同。 |
| Strings can be stored in memory in any manner. 字符串可以以任何方式存储在内存中。 | Character Array elements are sequentially stored at increasing memory places. 字符数组元素按顺序存储在递增的内存位置。 |
| The String Constant Pool contains all Strings. 字符串常量池包含所有字符串。 | The Heap contains all Character Arrays. 堆包含所有字符数组。 |
| The toCharArray() function of the String class can be used to transform a String into a Character Array. Eg: String s = “GEEKS”; char [] ch = s.toCharArray(); The code above converts a string into a char array. String类的toCharArray()函数可以用于将字符串转换为字符数组。例如:String s = “GEEKS”; char [] ch = s.toCharArray(); 上述代码将一个字符串转换为一个字符数组。 | A String Constructor can be used to transform a Character Array to a String. Eg: char[] a = {‘G’, ‘E’, ‘E’, ‘K’, ‘S’}; String A = new String(a); The code above converts a char array into a string. 可以使用字符串构造函数将字符数组转换为字符串。例如:char[] a = {‘G’, ‘E’, ‘E’, ‘K’, ‘S’}; String A = new String(a); 上述代码将一个字符数组转换为一个字符串。 |
959. Explain free() vs delete () in C++.
解释C++中的free()与delete()的区别。
- 知识点: 其他/未分类 (标签: interviewbit, wipro, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Wipro
- id: 69b37c9858d557c902bc9b91 | 官方: 否 | 付费: 否
答案:
Both delete() and free() are used to dynamically deallocate memory. - The free() function is a C library function that can also be used in C++, whereas the keyword "delete" is a C++ keyword.
delete()和free()都用于动态释放内存。- free()函数是C库函数,也可以在C++中使用,而关键字“delete”是C++的关键字。
- The delete operator deletes a pointer that was allocated using the new operator or a NULL pointer, whereas the free() function deletes a pointer that was allocated with the malloc(), calloc(), or realloc() functions or a NULL pointer.
- The delete operator in C++ invokes the class's destructor when it destroys the allocated memory, but the free() function does not; it just frees the memory from the heap.
960. Explain copy constructor vs assignment operator in C++.
解释C++中的复制构造函数与赋值运算符的区别。
- 知识点: 其他/未分类 (标签: interviewbit, wipro, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Wipro
- id: 69b37c9858d557c902bc9b94 | 官方: 否 | 付费: 否
答案:
A copy constructor is a member function that uses another object of the same class to initialise an object. Assignment operators are used to giving a variable a value. The assignment operator's left side operand is a variable, while the assignment operator's right side operand is a value.
复制构造函数是一个成员函数,它使用同一类的另一个对象来初始化一个对象。赋值运算符用于给变量赋值。赋值运算符的左侧操作数是变量,而赋值运算符的右侧操作数是值。
// C++
// C++
include
include<stdio.h>
using namespace std;
using namespace std;
class IB
class IB
{
public:
public:
IB() {}
IB() {}
IB(const IB &b)
IB(const IB &b)
{
cout<<"Copy constructor is called "<<endl;
cout << "调用了拷贝构造函数" << endl;
}
IB& operator = (const IB &b)
IB& operator = (const IB &b)
{
cout<<"Assignment operator is called "<<endl;
cout << "调用了赋值运算符" << endl;
return *this;
return *this;
}
};
// Driver code
// 驱动代码
int main()
int main()
{
IB b1, b2;
IB b1, b2;
b2 = b1;
b2 = b1;
IB b3 = b1;
IB b3 = b1;
getchar();
getchar();
return 0;
return 0;
}
Output:
输出:
Assignment operator is called
调用了赋值运算符
Copy constructor is called
调用复制构造函数
When a new object is generated from an existing object as a copy of the old object, the copy constructor is called. When an already initialised object is given a new value from another object, the assignment operator is used.
当从现有对象生成新对象作为旧对象的副本时,会调用复制构造函数。当已初始化的对象从另一个对象获得新值时,会使用赋值运算符。
961. Write the code to find the LCM of an array of numbers.
编写代码来求一个数字数组的 LCM(最小公倍数)。
- 知识点: 其他/未分类 (标签: interviewbit, wipro, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Wipro
- id: 69b37c9858d557c902bc9b97 | 官方: 否 | 付费: 否
答案:
We know that LCM (x, y) = (x * y) / GCD (x, y). We have to extend this idea to an array of numbers.
我们知道 LCM(x, y)=(x * y)/ GCD(x, y)。我们必须将此思路扩展到一组数字中。
Let's imagine we have an array arr[] with n members for which the LCM must be calculated.
假设我们有一个包含 n 个成员的数组 arr[],需要计算其 LCM。
Our algorithm's major steps are as follows: - Set res = arr[0] as the first value.
我们算法的主要步骤如下:- 将 res = arr[0] 作为初始值。
Iterate over all of the array's elements, from i = 1 to i = n-1.Our lcm, which is stored in res, is LCM of (arr[0], arr[1],........, arr[i-1]) at the ith iteration. LCM (arr[0], arr[1],...., arr[i]) = LCM (ans, arr[i]). As a result, we only need to do res = LCM (ans, arr[i]) = (ans * arr[i]) / gcd at the i'th iteration (ans, arr[i]).
//C++ program to find the LCM of n elements of an array//用 C++ 程序求一个数组中 n 个元素的 LCM
include <bits/stdc++.h>
using namespace std;
using namespace std;
typedef long long int ll;
typedef long long int ll;
//the function that finds
//该函数用于求
//GCD of 'x' and 'y'
//‘x’和‘y’的 GCD
int GCD(int x, int y)
int GCD(int x, int y)
{
if (y == 0)
if (y == 0)
return x;
return x;
return GCD(y, x % y);
return GCD(y, x % y);
}
//Driver Code
//驱动程序代码
int main()
int main()
{
int a[] = { 11, 7, 3, 9, 4 };
int a[] = { 11, 7, 3, 9, 4 };
int len = sizeof(a) / sizeof(a[0]);
int len = sizeof(a) / sizeof(a[0]);
// Initializing result which will store the lcm
// 初始化将要存储最小公倍数的结果变量
ll res = a[0];
ll res = a[0];
// res contains LCM of a[0], ..a[i]
// res 包含 a[0], ..a[i] 的最小公倍数
// after i'th iteration,
// 在第 i 次迭代之后,
for (int i = 1; i < len; i++)
for (int i = 1; i < len; i++)
res = (((a[i] * res)) /
res = (((a[i] * res)) /
(GCD(a[i], res)));
(GCD(a[i], res)));
cout<<res<<endl;
cout<<res<<endl;
return 0;
return 0;
}
Output:
输出:
2772
962. Get the nth Fibonacci number in O(n) time and O(1) space complexity.
在 O(n) 时间和 O(1) 空间复杂度下获取第 n 个斐波那契数。
- 知识点: 其他/未分类 (标签: interviewbit, wipro, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Wipro
- id: 69b37c9858d557c902bc9b9a | 官方: 否 | 付费: 否
答案:
//Javascript
//Javascript
function fib(n){
function fib(n){
let [x, y] = [0, 1]
let [x, y] = [0, 1]
while (n > 0){
while (n > 0){
[x, y] = [y, x + y]
[x, y] = [y, x + y]
n -= 1
n -= 1
}
return x
return x
}
This solution has a linear time complexity of O(n) and a constant space complexity of O(1). The number of loops required to determine the nth fib number will still increase linearly as n increases, but as we extend the sequence out, we are overriding the previous numbers in the sequence, keeping the space complexity constant for any input n. It is often referred to as the Iterative Top-Down Approach.
此解具有线性时间复杂度 O(n) 和常数空间复杂度 O(1)。确定第 n 个斐波那契数所需的循环次数会随着 n 的增加而线性增加,但当我们扩展序列时,会覆盖前面的数字,使得对于任何输入 n,空间复杂度保持不变。这通常被称为迭代自顶向下方法。
963. List the important functionalities/features of an operating system.
列出操作系统的重要功能/特性。
- 知识点: 其他/未分类 (标签: interviewbit, wipro, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Wipro
- id: 69b37c9858d557c902bc9b9d | 官方: 否 | 付费: 否
答案:
The following are some of the most important features of an operating system: - The operating system allows diverse applications and peripheral devices to share the computer's memory and central processing unit time.
以下是操作系统最重要的一些功能: - 操作系统允许不同的应用程序和外设共享计算机的内存和中央处理单元(CPU)时间。
- Between the user and the computer hardware, an Operating System serves as a communication bridge (interface). A user interface, such as a graphical user interface or a command line, is provided by an operating system.
- The ability to boot the computer is part of an operating system.
- It manages the peripheral devices and does some simple activities like keeping a track of all devices connected to the system, designating a program called the Input/Output Controller that is responsible for every device, and so on.
- It offers file management, which is the process by which an operating system maintains, fetches, manipulates, and saves data.
964. What are the advantages and disadvantages of time slicing in CPU Scheduling in OS?
在操作系统中,CPU 调度中的时间片轮转有哪些优点和缺点?
- 知识点: 其他/未分类 (标签: interviewbit, wipro, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Wipro
- id: 69b37c9858d557c902bc9ba2 | 官方: 否 | 付费: 否
答案:
Time slicing allows a task to run for a set amount of time before returning to the pool of ready tasks. The scheduler then determines the executable job depending on the priority and a variety of other factors. A task in a time-slicing method runs for a predetermined amount of time. If there is another task with a higher priority after that task is completed, the scheduler runs the priority task next, based on priority and other considerations.
时间片轮转允许任务在运行一段设定时间后返回到就绪任务池。调度器随后根据优先级和其他多种因素来确定可执行的作业。在时间片轮转方法中,任务运行一段预定时间。如果该任务完成后有另一个优先级更高的任务,则调度器会根据优先级和其他考虑因素,优先运行该高优先级任务。
The advantages of time slicing in CPU Scheduling are: - CPU resources are distributed fairly. The kernel of our CPUs does not simply allocate all of our PCs' resources to a single task or service. Because the CPU is always running multiple processes that are required for it to function, our kernel manages these processes without delay.
CPU 调度中时间片轮转的优点包括: - CPU 资源分配公平。CPU 的内核不会简单地将所有 PC 资源分配给单个任务或服务。由于 CPU 始终运行多个维持其功能所需的进程,内核会无延迟地管理这些进程。
- It prioritizes all processes equally. The CPU accomplishes this by running processes one at a time, slice by slice. A time slice is a brief period of time that is allotted to a process and executed by the CPU.
- It's simple to integrate into the system.
After a process has run for a set amount of time, it is interrupted and another process runs for the same amount of time. To save the states of preempted processes, the context switching approach is utilised. Hence, the states of the preempted processes are not lost.
The disadvantages of time slicing in CPU Scheduling are: - The processor output will be delayed if the slicing time is short.CPU 调度中时间片轮转的缺点包括: - 如果时间片过短,处理器输出将延迟。
- It spends a lot of time switching between contexts.
- The time quantum/slice has a significant impact on process management.
- Processes do not have defined priorities.
- Priority is not given to more vital jobs.
- It's challenging to come up with an adequate time quantum/slice.
965. Is the Wipro interview easy?
Wipro 面试容易吗?
- 知识点: 其他/未分类 (标签: interviewbit, wipro, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Wipro
- id: 69b37c9958d557c902bc9bf4 | 官方: 否 | 付费: 否
答案:
It makes no difference whether the Wipro interview is difficult or simple. The truth is that the more you prepare for the interview, the more likely you are to succeed. Acquire a thorough understanding of interview stages, rounds, and questions, among other things. Topics covered include programming languages, logical thinking, computer fundamentals and products/software/projects on which the candidate has recently or previously worked, etc.
Wipro 面试的难度如何并不重要。事实是,你为面试准备得越充分,就越有可能成功。深入了解面试阶段、轮次和问题以及其他方面。涵盖的主题包括编程语言、逻辑思维、计算机基础知识以及候选人最近或之前参与过的产品/软件/项目等。
966. How to apply for Wipro off campus?
如何申请 Wipro 的校园外职位?
- 知识点: 其他/未分类 (标签: interviewbit, wipro, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Wipro
- id: 69b37c9958d557c902bc9bf7 | 官方: 否 | 付费: 否
答案:
You can also apply to Wipro through recruitment websites, applying on the company's website, attending recruiting drives, using the employee referral system, or consulting with placement experts or groups.
你还可以通过招聘网站、在公司网站上申请、参加招聘活动、利用员工推荐系统或咨询就业专家或团体来向 Wipro 申请。
967. Why Wipro?
为什么选择Wipro?
- 知识点: 其他/未分类 (标签: interviewbit, wipro, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Wipro
- id: 69b37c9958d557c902bc9c05 | 官方: 否 | 付费: 否
答案:
Wipro is ranked third among India's top IT companies. It is a fantastic company to work for. Here, your qualities will be valued. The organization has good policies and possibilities, and it works in a range of fields and countries. Once inside, you'll have a variety of options based on your skills. Wipro's infrastructure and team management are unquestionably excellent. Work-life balance is excellent too at Wipro.
Wipro在印度顶级IT公司中排名第三。这是一家非常优秀的公司,值得为之工作。在这里,你的才能将得到重视。公司拥有良好的政策和机会,业务涵盖多个领域和国家。一旦入职,你将根据自己的技能拥有多种选择。Wipro的基础设施和团队管理无疑非常出色。在Wipro,工作与生活的平衡也非常好。
968. What is the Wipro Elite Test?
什么是Wipro精英测试?
- 知识点: 其他/未分类 (标签: interviewbit, wipro, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Wipro
- id: 69b37c9958d557c902bc9c16 | 官方: 否 | 付费: 否
答案:
Wipro has launched the Wipro Elite NLTH Hiring Process for freshers across India. It is a National Level Talent Hunt Test to attract the greatest talent in the country. In Wipro Elite, all qualified candidates would have to go through an online evaluation process with three rounds of selection. - Aptitude Exam
Wipro已为全印度的应届生推出了Wipro精英NLTH招聘流程。这是一项全国性的人才搜寻测试,旨在吸引国内最优秀的人才。在Wipro精英计划中,所有合格的候选人需经历一场包含三轮选拔的在线评估过程。- 能力测试
- Written Communication Test
Coding test.
Coding Problems
0/7
Easy Problems
简单问题
Arrays
数组
Strings
字符串
Math
数学
Time Complexity
时间复杂度
Spiral Order Matrix I
螺旋顺序矩阵 I
Easy
简单
68.0 Mins
68.0 分钟
Solve
解答
Multiple left rotations of the array
数组的多重左旋转
Easy
简单
25.55 Mins
25.55分钟
Solve
解答
String Inversion
字符串反转
Very Easy
非常简单
12.29 Mins
12.29分钟
Solve
解答
Socks Pair
袜子配对
Very Easy
非常简单
17.17 Mins
17.17分钟
Solve
解答
Pythagorean Triplets
毕达哥拉斯三元组
Easy
简单
26.44 Mins
26.44分钟
Solve
解答
Two Stores
两家商店
Easy
简单
31.56 Mins
31.56分钟
Solve
解答
Palindromic Time
回文时间
Easy
简单
41.37 Mins
41.37分钟
Solve
解答
0/1
Intermediate Problems
中级问题
Strings
字符串
Implement StrStr
实现StrStr
Medium
中等
33.14 Mins
33.14分钟
Solve
解答
969. Technical Interview Questions For Freshers At Yahoo
Yahoo初级技术人员面试问题
- 知识点: 其他/未分类 (标签: interviewbit, yahoo, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 雅虎
- id: 69b37c9c58d557c902bc9daa | 官方: 否 | 付费: 否
答案:
To cross this stage without any confusion, the applicant must be confident and tension-free. We did our best to compile all important information in this single section to help you improve your understanding on your core subjects. Interview Questions related to DBMS - What is a Database Management System (DBMS)?
为了毫无困惑地通过这一阶段,应聘者必须自信且无压力。我们尽力在本节中汇编所有重要信息,以帮助您提高对核心科目的理解。与DBMS相关的面试问题——什么是数据库管理系统(DBMS)?
- What are the drawbacks of using a file-processing system?
- What are the three different layers of data abstraction?
- What is the definition of normalization?
- What exactly is the E-R model?
- What exactly is a data model?
- What's the difference between multitasking and multithreading?
- Define demand paging, page faults, replacement methods, thrashing, and other terms related to paging on demand.
- What is the difference between paged segmentation and segment paging?
- Which command would be used to copy the entire diskette on a PC running DOS?
- What is the definition of an entity?
- What is DML Compiler and how does it work?
- What is the purpose of a query evaluation engine?
- What does it mean to be fully functionally dependent?
- What is concurrency control and how does it work?
- What exactly is 4NF?
- What is a Stored Procedure, and how does it work?
- What are the components of a relational database management system (RDBMS)?'Describe the situation.
- Explain the differences between an intranet and an extranet.
- How many types of relationships exist in database designing?
- What is Hashing technique?
970. Technical Interview Questions for Experienced at Yahoo
Yahoo经验丰富人员技术面试问题
- 知识点: 其他/未分类 (标签: interviewbit, yahoo, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 雅虎
- id: 69b37c9c58d557c902bc9db0 | 官方: 否 | 付费: 否
答案:
In this round, the interviewer's attitude will be crucial. He or she is constantly interested in learning about your knowledge level in the core courses you are studying for graduation. Even if you don't know the answer, be honest.
在这一轮中,面试官的态度至关重要。他或她总是有兴趣了解您在毕业时所学核心课程中的知识水平。即使您不知道答案,也要诚实。
Interview Questions for Java Developers - What is the distinction between an Abstract class and an Interface class?
Java开发者面试问题——抽象类和接口类之间的区别是什么?
- What is the difference between checked and unchecked exceptions?
- What is a user-defined exception, and how does it work?
- What's the distinction between C++ and Java?
- In JAVA, what are statements?
- What exactly is a JAR file?
- What exactly is JNI?
- What is serialization and how does it work?
- Why do some java interfaces have null values? What does this imply? Give me some JAVA null interfaces.
- What is Hibernate's benefit over JDBC?
- What exactly is Hibernate?
- What exactly is ORM?
- What is ORM and what does it entail?
- What are the layers of ORM?
- Why is it necessary to use ORM tools such as hibernate?
- What Is Hibernate and What Does It Simplify?
- What is the primary distinction between Entity Beans and Hibernate?
What are the Hibernate framework's core interfaces and classes?
Interview Questions for Web Methods Developers - What exactly is EAI?Web Methods开发者面试问题——EAI到底是什么?
- What are the main EAI categories?
- What are the Benefits of Enterprise Application Integration (EAI)?
- What are some of the drawbacks of EAI?
- What are the major providers of EAI tools and software?
- What is the definition of web methods?
- What are the web Methods modules? What is a product suite?
- What are the web Methods Integration tools?
- What Exactly Is a Developer?
- What Is an Element, Exactly?
- What is the definition of a startup service?
- What Is a Flow Service and How Does It Work?
- What Exactly Is a Pipeline?
- How can I use a browser to call a service?
- When the pub flow trace Pipeline service is used, what happens?
- What is the purpose of the "scope" field on the Properties tab when adding a BRANCH flow element?
- What is the major purpose of the pub flow save Pipeline service that is built-in?
- Where will you find the code when you create and save the FLOW “my.pack: myFlow” in the “My Pack” package?
- What is the function of the Branch?
- If a Flow EXIT does not mention a "from," what happens by default?
- One or more starting services may be included in an Integration Server package. What time does a startup service start?
- Which port is the default HTTP listener for the web Methods Integration Server?
- How can the date format of the web Methods Integration Server reporting be changed?
What must be done after a standard installation to use the pub.file: getFile service?
Interview Questions for SAP Developers - What are the benefits and drawbacks of ABAP programming with views?SAP开发者面试问题——使用视图进行ABAP编程有哪些优缺点?
- What is the method for storing data in a cluster table?
- Have you ever experimented with performance tuning?
- What key steps will you take to accomplish this?
- How can I make tables that are client-independent?
- What kind of exits have you written for users?
- What is the best way to debug a script form?
- What are the various data dictionary object types?
- What is the procedure for creating a table in the data dictionary?
- What are the different types of domains and data elements?
- What is the definition of a collect statement? What distinguishes it from append?
- What are the different sorts of extractors?
- What are the steps in the LO Extraction process?
- What is the best way to connect LIS Info Structures?
- What are the distinctions between ODS, Info Cube, and Multi Provider?
- What are the differences between Start, Transfer, and Update routines?
- What is the difference between a start and an update routine, and when, how, and why are they referred to as such?
- What is the name of the table that starts routines?
- How did you include Start routines in your project?
- What are Return Tables and How Do They Work?
- What is the relationship between the start routine and the return table?
- What is compression, exactly?
- What exactly is a rollup?
- What is table partitioning in an InfoCube, and what are the advantages of partitioning?
How many more divisions are produced, and why are they made?
Interview Questions for .NET Developers - What does it mean to "remote"?.NET开发者面试问题——“远程”意味着什么?
- What is a namespace's primary purpose?
- When it comes to binding, what is the difference between early and late binding?
- Can more than one .NET language's compiled code be contained in a single DLL file?
- What is a Clustered Index, and how does it work?
- What is a Non–non-clustered index, and how does it work?
- How does an OleDbCommand object fit into a data model?
- To load your produced dataset with data, whatever technique do you use on the Data Adapter control?
- What is the difference between a Dataset and a Collection? Clone and Dataset are two different types of clones. Copy?
- What exactly is a Data Adapter?
- What is the difference between a Command Object and a Command Object?
- What is Data View's primary function?
- What are the benefits of using a Connection Object?
- What is the definition of a stored procedure?
- What is the difference between CLR, CTS, and CLS in the .NET Framework?
- What exactly is BCL?
- What is the definition of an extended class?
- What is the definition of inheritance hierarchy?
- What is the definition of overriding?
- What are the differences between events and delegates?
- What is the difference between functional and non-functional requirements?
- What is the purpose of code review?
- What exactly is MIME?
- What's the difference between a Server and a Client? Transfer and Reaction Redirect
- How do you add a handler to an event?
- What is the best way to use validations on an aspx page?
- What is Cross-Page Posting, and how does it work?
- Data Science
- All Events
- My Events
971. Is Yahoo's pay and perks far superior to those offered by any other company in India (with the exception of Google and a few others)?
与印度其他公司(除谷歌和少数几家外)相比,雅虎的薪资和福利是否远优越?
- 知识点: 其他/未分类 (标签: interviewbit, yahoo, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 雅虎
- id: 69b37c9d58d557c902bc9e07 | 官方: 否 | 付费: 否
答案:
Yes, Yahoo is one of the best companies to work for. As an engineer, you'll have the opportunity to build large-scale structures. More than 600 million people utilize mobile apps. So you'll be working on the backend (ML, big-data, server side tech, etc. ), front end (Node.js, javascript, etc. ), mobile app platforms (iOS and Android), networking, and so on.
是的,雅虎是最适合工作的公司之一。作为一名工程师,您将有机会构建大规模系统。超过6亿人使用移动应用。因此,您将从事后端(机器学习、大数据、服务器端技术等)、前端(Node.js、JavaScript等)、移动应用平台(iOS和Android)、网络等方面的工作。
One of the nicest bonuses at Yahoo is the people. Yahoos are highly pleasant and helpful, which are attributes that are required when you are fresh out of college and trying to find your way in the corporate world.
雅虎最令人愉悦的福利之一就是员工。雅虎人非常友善且乐于助人,这在你刚毕业并试图在企业界找到方向时是必需的品质。
Yahoo's pay and perks were far superior to those offered by any other company in India (with the exception of Google and a few others).
雅虎的薪酬和福利远优于印度任何其他公司(除谷歌和其他少数公司外)。
For people relocating from other cities, they give a sizable signing bonus. 2. Medical coverage for the entire family, including parents who are financially dependent. 3. There is an option to take out an interest-free loan for a specified sum, which could be paid back in three, six, or twelve monthly instalments. 4. Breakfast, lunch, and dinner are all provided for free at the Yahoo offices. 5. The office includes a 24-hour café that provides free tea, coffee, and health drinks. 6. There is a recreation facility with sports and games available. 7. Once a year, there is an offsite (to neighbouring hill stations) and a giant yearly year-end party.
- 对于从其他城市搬迁的员工,他们会提供可观的签约奖金。 2. 为整个家庭提供医疗覆盖,包括经济上依赖的父母。 3. 可以选择为指定金额申请无息贷款,并可在三个月、六个月或十二个月内分期偿还。 4. 雅虎办公室免费提供早餐、午餐和晚餐。 5. 办公室设有24小时咖啡厅,提供免费茶、咖啡和健康饮品。 6. 提供带有运动项目的娱乐设施。 7. 每年有一次外出活动(前往邻近的山站)和一场盛大的年度年终派对。
972. How can I apply for Yahoo?
如何申请雅虎的职位?
- 知识点: 其他/未分类 (标签: interviewbit, yahoo, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 雅虎
- id: 69b37c9d58d557c902bc9e0a | 官方: 否 | 付费: 否
答案:
Candidates should go to @careers.yahoo.com in Yahoo's careers area. They can then submit an application.
候选人应访问雅虎职业区域的@careers.yahoo.com。然后,他们可以提交申请。
973. How many rounds are there in a Yahoo interview? Or What is the Yahoo Interview Process?
雅虎面试中有多少轮?或者雅虎面试流程是什么?
- 知识点: 其他/未分类 (标签: interviewbit, yahoo, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 雅虎
- id: 69b37c9d58d557c902bc9e0d | 官方: 否 | 付费: 否
答案:
The written interview is divided into two parts: aptitude and technical. Data-Structures, Algorithms, Networking, and DBMS are the most common technical questions. There would be a series of technical interviews after the written round was completed.
笔试分为两部分:能力测试和技术测试。数据结构、算法、网络和数据库管理系统是最常见的技术问题。笔试完成后会有一系列技术面试。
974. How to get an Internship at Yahoo?
如何获得雅虎的实习机会?
- 知识点: 其他/未分类 (标签: interviewbit, yahoo, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 雅虎
- id: 69b37c9d58d557c902bc9e10 | 官方: 否 | 付费: 否
答案:
When applying for an internship at Yahoo, you must go through a thorough interview procedure. Typically, candidates will be invited to engage in one or more phone interviews, and a Skype interview, and submit work samples.
申请雅虎实习时,你必须经历一个全面的面试流程。通常,候选人会被邀请参加一次或多次电话面试、一次Skype面试,并提交工作样本。
975. What do you use for revision control?
你们使用什么进行版本控制?
- 知识点: 其他/未分类
- 类型: technical | 难度: medium | 子类型:
- 分类: general
- id: 695a049b084cf0f0766d17c0 | 官方: 是 | 付费: 否
答案:
Good tooling is a strong indicator of a good team. If a team is using an ancient revision control system, they are probably using a bunch of other outdated tools. Furthermore, they probably don’t value the efficiency gains that can be achieved by investing in good tooling.
良好的工具是优秀团队的有力指标。如果一个团队在使用古老的版本控制系统,他们可能也在使用一系列其他过时的工具。此外,他们可能不重视通过投资良好工具可以获得的效率提升。
A good follow-up question is to ask about workflows. Do you use branches? Do you prefer rebasing or merging (git terms)? These questions will tell you how expert they are with their chosen tools, which will tell you a lot about their level of proficiency, which will in turn tell you what to expect if you take the job. For example, will you be the “local git expert” or will you be learning from a veritable Linus Torvalds?
一个好的跟进问题是询问工作流程。你们使用分支吗?你们更喜欢变基还是合并(git术语)?这些问题会告诉你他们在所选工具方面的专业程度,这能让你了解他们的熟练水平,进而告诉你如果接受这份工作你会遇到什么。例如,你会成为“本地git专家”还是向真正的Linus Torvalds学习?
This question can start a discussion about tools in general, which will often give you some good insight.
这个问题可以引发关于一般工具的讨论,这通常会给你一些很好的见解。
976. Do you write unit tests?
你们编写单元测试吗?
- 知识点: 其他/未分类
- 类型: technical | 难度: medium | 子类型:
- 分类: general
- id: 695a0554084cf0f0766d34a4 | 官方: 是 | 付费: 否
答案:
Be careful when making conclusions about an engineering team based on their unit testing practices. If a team gets excited when I ask about unit testing, it’s generally a good sign. Though on the other hand, if they can’t explain why they unit test, or the drawbacks of unit testing, this can be an indication of blind sheep dogma. If they provide bad excuses for why they don’t write tests, especially excuses like “we don’t have time”, that is a bad sign for me.
在基于单元测试实践对工程团队下结论时要小心。如果当我询问单元测试时团队感到兴奋,这通常是个好迹象。但另一方面,如果他们无法解释为什么进行单元测试,或单元测试的缺点,这可能是盲从教条的迹象。如果他们为不编写测试提供糟糕的理由,尤其是像“我们没有时间”这样的借口,对我来说是个坏兆头。
If the engineers tell me they write unit tests, and they are able to tell me metrics about their tests, such as how long they take to run, how many tests they have, and their code coverage, that is pretty attractive to me. It tells me that they have good tools, and they know how to use them. On the other hand, if they believe that 100% code coverage ensures a bug-free code base, I am leery.
如果工程师告诉我他们编写单元测试,并且能告诉我测试的指标,比如运行时间、测试数量以及代码覆盖率,这很吸引我。这告诉我他们有好工具,并知道如何使用它们。另一方面,如果他们相信100%代码覆盖率就能确保无bug的代码库,我会持怀疑态度。
I want to know beforehand if I will be working on a large, old, untested codebase at this company. This will help me manage my own expectations and decide if that’s something I want to do.
我想事先知道在这家公司是否会处理一个庞大、陈旧且未经测试的代码库。这将帮助我管理自己的预期,并决定这是否是我想要做的事情。
Follow-up questions:
后续问题:
- Do you prefer unit tests or integration tests?
- Do you have acceptance tests?
- What testing framework(s) do you use? Do you like it?
- How long do your unit tests take to run?
977. What do you measure?
你们测量什么?
- 知识点: 其他/未分类
- 类型: technical | 难度: medium | 子类型:
- 分类: general
- id: 695a05ec084cf0f0766d472c | 官方: 是 | 付费: 否
答案:
This is an open-ended question meant to find out if the team has put effort into measuring their software. For web development teams, the answers tend to focus on performance metrics like server response times, request throughput, number of users, client-side responsiveness, etc. But the discussion can go to things like number of users who speak different languages, browser breakdown, cache hit/miss rates, and myriad other topics. If the team hasn’t taken the time to measure, it can be an indicator that they don’t use real data to inform their decisions. They may be premature optimizers. I value a team that uses real, measured data to make decisions, especially about performance, but it applies to so many other things.
这是一个开放性问题,旨在了解团队是否已投入精力来测量其软件。对于 Web 开发团队,答案往往集中在性能指标上,如服务器响应时间、请求吞吐量、用户数量、客户端响应性等。但讨论也可以涉及使用不同语言的用户数量、浏览器分布、缓存命中/未命中率以及其他众多话题。如果团队没有花时间进行测量,这可能表明他们不基于真实数据来指导决策,或可能存在过早优化的问题。我重视那些使用真实测量数据做决策的团队,尤其是在性能方面,但这同样适用于许多其他领域。
If the interviewer knows answers to many of these questions, it’s a good sign that the team is high quality. If they have no idea why they would even care about any of these measurements, it could be a negative indicator.
如果面试官能回答许多这些问题,这是团队高质量的积极信号。如果他们完全不明白为什么要关心这些测量,这可能是一个负面指标。
Again, the rule about dogma applies here. If the team seems to have latched onto a metric that doesn’t necessarily yield valuable, actionable information, and they can’t explain this to your satisfaction, this may be a warning sign.
再次强调,关于教条的规则在这里也适用。如果团队似乎固守于一个不一定产生有价值、可操作信息的指标,并且无法令你满意地解释这一点,这可能是一个警告信号。
Follow-up questions:
后续问题:
- What are your most important product metrics?
- What measurement systems do you use? (e.g., MixPanel, statsd, etc.)
978. How do you find and fix bugs?
你们如何发现并修复缺陷?
- 知识点: 其他/未分类
- 类型: technical | 难度: medium | 子类型:
- 分类: general
- id: 695a05fb084cf0f0766d47a7 | 官方: 是 | 付费: 否
答案:
A strong team usually has dedicated testers, and the team’s developers focus on quality. A really strong team has impressive test automation. Some teams are too small for dedicated testers or test automation, but that doesn’t necessarily mean they are a bad team. When I ask this question, I’m trying to get a feel for their process. Is their hair always on fire? Do they have a sane process for finding and prioritizing bugs? Do they rely on users to find bugs?
强大的团队通常有专门的测试人员,并且团队中的开发人员注重质量。真正强大的团队拥有令人印象深刻的自动化测试。有些团队规模过小,无法配备专门的测试人员或自动化测试,但这不一定意味着他们是糟糕的团队。当我问这个问题时,我试图了解他们的流程。他们是否总是焦头烂额?他们是否有合理的流程来发现和优先处理缺陷?他们是否依赖用户来发现缺陷?
Follow-up questions:
后续问题:
- How do you prioritize bugs?
- What bug tracker do you use? (and what do you hate about it)
- Do you use Excel to track bugs? (nooo!)
- How many bugs do you have in your bug tracker?
- How long do your bugs take to fix (min/max/typical)?
979. What frameworks do you use?
你们使用哪些框架?
- 知识点: 其他/未分类
- 类型: technical | 难度: medium | 子类型:
- 分类: general
- id: 695a0623084cf0f0766d4968 | 官方: 是 | 付费: 否
答案:
My personal preference with frameworks is two fold:
我对框架的个人偏好有两个方面:
- I like modern stuff.
- I like new-to-me stuff.
So if a team is building an AIX desktop application in Motif, I am probably not interested. But maybe you are. This is a deeply personal topic, and you should approach it with a solid understanding of your own preferences.
因此,如果一个团队正在用 Motif 构建 AIX 桌面应用程序,我可能不感兴趣。但也许你感兴趣。这是一个非常个人化的话题,你应该在对自己偏好有清晰理解的基础上来探讨。
Regardless of your framework preferences, it’s important to understand why the team has chosen their framework(s). Are they hype-driven? Do they change frameworks like their underwear? Is their codebase littered with shrapnel from framework-of-the-month churn? Are they stuck on an ancient version?
无论你的框架偏好如何,理解团队选择其框架的原因很重要。他们是受炒作驱动吗?他们是否像换内衣一样频繁更换框架?他们的代码库是否充斥着“每月最佳框架”更替留下的碎片?他们是否被困在过时的版本上?
On the topic of why, I like to understand how much latitude developers have in choosing technologies. Does management mandate technology choice? Does management defer to developers? To get to the bottom of these questions, I usually ask, “How did you come to use framework X in your project?”. If developers don’t know the answer, that might be a bad sign, or it may mean they are just new enough to the company that they weren’t around for the decision.
关于原因,我喜欢了解开发人员在选择技术方面有多少自由度。管理层是否强制指定技术?还是管理层尊重开发人员的意见?为了弄清这些问题,我通常会问:“你们是如何在项目中使用框架 X 的?”如果开发人员不知道答案,这可能是一个不好的迹象,也可能意味着他们刚加入公司不久,没有参与该决策。
I like to see teams make contributions to open source projects they use. This tells me they are not only able to use open source code, but they are proficient enough to contribute to it as well. These are the kinds of developers I like to work with. If the company is willing to pay them to do this, even better. That tells me the company understands what it means to be an open source citizen.
我喜欢看到团队为他们使用的开源项目做贡献。这告诉我,他们不仅能使用开源代码,而且熟练到能为其贡献代码。这些是我喜欢共事的开发人员。如果公司愿意支付他们从事这项工作,那就更好了。这说明公司理解作为一个开源社区成员的意义。
If the team is reinventing the wheel rather than using readily available tools to help them build their product, I get nervous. There are exceptions to this rule. For example, when Facebook was working on their own framework, I wouldn’t have held it against them (or would I).
如果团队在重新发明轮子,而不是使用现成的工具来帮助他们构建产品,我会感到紧张。这条规则也有例外。例如,当Facebook在开发自己的框架时,我不会因此责怪他们(或者我会吗)。
980. When can we pair?
我们什么时候可以结对?
- 知识点: 其他/未分类
- 类型: technical | 难度: medium | 子类型:
- 分类: general
- id: 695a0674084cf0f0766d4df4 | 官方: 是 | 付费: 否
答案:
If you want to get a really clear picture of what it’s like to work with this team, then try actually working with them. I’ve never personally done this, but I have a friend who has (a likely story, right). I think it’s a fantastic idea. If you want to learn almost anything about the team, go work with them for a half day. It might require you to sign an NDA. If the team is even willing to consider this idea, I think it’s a very good sign.
如果你想要真正清楚地了解与这个团队合作的情况,那么试着实际和他们一起工作。我个人从未这样做过,但我有一个朋友这样做过(这可能是虚构的故事,对吧)。我认为这是一个绝妙的主意。如果你想了解团队的大致情况,那就去和他们一起工作半天。这可能需要你签署保密协议。如果团队甚至愿意考虑这个想法,我认为这是一个非常好的迹象。
You will probably have to arrange this with someone from management, so this question is more designed to get a reaction from the developers. They may be so appalled by the idea that it’s not worth bringing up with management.
你可能需要和管理层中的某个人来安排这件事,所以这个问题更多是为了从开发人员那里得到反应。他们可能会被这个想法吓到,以至于不值得向管理层提出。
981. When is your next deadline?
你们的下一个截止日期是什么时候?
- 知识点: 其他/未分类
- 类型: technical | 难度: medium | 子类型:
- 分类: general
- id: 695a069a084cf0f0766d5413 | 官方: 是 | 付费: 否
答案:
This question is designed to tell you more about the development process the company actually follows. This question, alone, is not very informative, but when you add these questions, things get much more interesting:
这个问题旨在让你更深入地了解公司实际遵循的开发流程。仅凭这个问题本身信息量不大,但当你结合以下这些问题时,事情就变得有趣得多:
- Who set this deadline?
- Did you meet your last deadline? If not, why not?
High quality teams agree on and commit to deadlines together. Deadlines that are handed down arbitrarily can be a sign of dysfunction, or at least that engineers don’t have a seat at the table when determining schedule.
高质量的团队会共同商定并承诺截止日期。任意下达的截止日期可能是功能失调的迹象,或者至少说明工程师在确定日程时没有话语权。
982. How long does it take to set up a new development environment?
设置一个新开发环境需要多长时间?
- 知识点: 其他/未分类
- 类型: technical | 难度: medium | 子类型:
- 分类: general
- id: 695a06c9084cf0f0766d556b | 官方: 是 | 付费: 否
答案:
This question serves to help gauge how much effort the company has put into developer experience. Does it take hours, days, or weeks for new developers to have their computer set up and ready to start coding? Is it automated or manual? This will tell you how proficient the team is at “supporting activities” that aren’t directly related to writing software, but that help support it. Does the team take this seriously?
这个问题有助于评估公司投入了多少精力在开发者体验上。新开发人员的电脑设置好并准备开始编码需要几个小时、几天还是几周?是自动化还是手动?这会告诉你团队在“支持性活动”方面的熟练程度,这些活动虽不直接与编写软件相关,但有助于支持软件开发。团队是否认真对待这一点?
Some companies pride themselves on having a dev setup process that is so fast that new developers can put code into production on day 1. This shows that the company takes providing a frictionless experience for developers pretty serious.
一些公司以拥有极快的开发环境设置流程而自豪,新开发人员可以在第一天就将代码投入生产。这表明公司非常重视为开发人员提供无摩擦的体验。
983. When was the last time you wrote code?
你最后一次写代码是什么时候?
- 知识点: 其他/未分类
- 类型: technical | 难度: medium | 子类型:
- 分类: general
- id: 695a071a084cf0f0766d5765 | 官方: 是 | 付费: 否
答案:
I like managers with a strong technical background. No offense to my MBA friends, but I’ve found the managers I really like are those who have done what I do.
我喜欢有强大技术背景的经理。无意冒犯我那些MBA朋友,但我发现我真正喜欢的经理是那些做过我所做工作的人。
984. 什么是监督学习(supervised learning)和无监督学习(unsupervised learning)?
- 知识点: 其他/未分类
- 类型: technical | 难度: medium | 子类型:
- 分类: general
- id: 695b16af084cf0f076790454 | 官方: 是 | 付费: 否
答案:
- 监督学习是指通过使用带标签的数据来训练模型,目标是预测输入数据的标签或结果。常见的算法包括线性回归、逻辑回归、支持向量机(SVM)等。
- 无监督学习是指在没有标签数据的情况下,训练模型进行模式识别和数据聚类。常见的无监督学习算法包括K-means聚类、层次聚类和主成分分析(PCA)。
985. 什么是过拟合(Overfitting)?如何防止过拟合(Overfitting)?
- 知识点: 其他/未分类
- 类型: technical | 难度: medium | 子类型:
- 分类: general
- id: 695b16e5084cf0f076790a88 | 官方: 是 | 付费: 否
答案:
- 过拟合是指模型在训练数据上表现很好,但在未见过的数据上表现差,导致其泛化能力差。过拟合通常发生在模型复杂度过高时。
- 防止过拟合的方法包括:
正则化(Regularization)(如L1、L2正则化(L1/L2 Regularization));
早停(Early Stopping)(在验证集(Validation Set)性能不再提高时停止训练);
数据增强(Data Augmentation)(增加训练样本量,或者对数据进行变换);
交叉验证(Cross-Validation)(例如K-fold交叉验证(K-fold Cross-Validation));
简化模型(Model Simplification)(减少特征数,或减少网络层数);
使用更多的数据(More Data)
986. Q3. Who are Google’s main rivals, and how does Google outperform them?
问题3:谷歌的主要竞争对手是谁,以及谷歌如何超越它们?
- 知识点: 其他/未分类 (标签: Google rivals, competition)
- 类型: technical | 难度: medium | 子类型:
- 分类: general
- 公司: Google
- id: 696470f0a9243c30c87057be | 官方: 是 | 付费: 否
答案:
(补充答案·AI 生成(AI-Generated))
主要对手:搜索(Search)与广告(Advertising)有 Microsoft/Bing、Amazon;移动生态(Mobile Ecosystem)有 Apple;云计算(Cloud Computing)有 AWS、Azure;AI 有 OpenAI、Microsoft;流媒体(Streaming)有 Meta 等。Google 的优势:强大的搜索数据与算法(Search Algorithm)、Android + Chrome 的流量入口(Traffic Entry)、规模化基础设施(Infrastructure)与 TPU/Gemini 的 AI 能力、覆盖广告到云到硬件的生态协同(Ecosystem Synergy)。
987. Q4. What is the future of Google, and how is it positioning itself to remain competitive and innovative in the years to come?
问题4:谷歌的未来是什么,以及它如何定位自身以在未来的岁月中保持竞争力和创新能力?
- 知识点: 其他/未分类 (标签: Google future, competitiveness)
- 类型: technical | 难度: medium | 子类型:
- 分类: general
- 公司: Google
- id: 696470f1a9243c30c87057c1 | 官方: 是 | 付费: 否
答案:
(补充答案·AI 生成(AI-Generated))
方向:①AI-first,以 Gemini 接入搜索(Search)、Workspace、Android、Cloud;②云与基础设施(Cloud and Infrastructure)继续扩张(GCP、TPU);③巩固移动(Mobile)(Android)+ 浏览器(Browser)(Chrome)入口;④硬件与终端(Hardware and Devices)(Pixel、可穿戴);⑤在隐私合规(Privacy Compliance)(隐私沙盒(Privacy Sandbox))与监管压力下调整广告模式(Advertising Model);⑥探索新赛道(量子(Quantum)、自动驾驶(Autonomous Driving) Waymo)。回答时强调「AI 整合 + 生态协同(Ecosystem Synergy)」是其保持竞争力与创新的主线。
988. Interview Rounds
面试轮次
- 知识点: 其他/未分类 (标签: interviewbit, accenture, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Accenture
- id: 69b3791a58d557c902b9734d | 官方: 否 | 付费: 否
答案:
Online Assessment Test: This first round is a little difficult among all the other rounds as it is an eliminator round in the Accenture interview process. Accenture online assessment tests are designed to examine the cognitive function and ability of the appearing candidates. This round has questions based on Quantitative Aptitude, Logical Reasoning, and Verbal Ability. Here in this round, you will be required to answer the prescribed number of questions in the allocated time frame.
在线评估测试:这第一轮在所有其他轮次中稍有难度,因为它是埃森哲面试流程中的淘汰轮。埃森哲在线评估测试旨在考察候选人的认知功能和能力。这一轮包含基于数量能力、逻辑推理和语言能力的题目。在此轮中,你需要在规定时间内回答指定数量的题目。
Technical Interview: If you clear the online test, then you will be called for the technical interview. The technical round mainly focuses to evaluate the coding & problem-solving skills of the candidate. The candidates should have basic knowledge of data structures, algorithms, and other computer science-related subjects like OS, DBMS, CN, etc. in order to ace the technical interview. Depending on the job role you’re applying to, you can expect to be tested in respective areas. If you are an experienced candidate or applying for a critical role, you might have to face two or more rounds of technical interviews.
技术面试:如果你通过在线测试,你会被邀请参加技术面试。技术轮主要评估候选人的编码和问题解决能力。候选人应具备数据结构、算法以及其他计算机科学相关科目(如操作系统、数据库管理系统、计算机网络等)的基础知识,以便在技术面试中表现出色。根据你申请的职位角色,你可能会在相应领域接受测试。如果你是有经验的候选人或申请关键职位,你可能需要面对两轮或更多轮的技术面试。
HR Interview: The HR Interview is the final round to select a candidate as an employee at Accenture since it helps to determine a candidate’s personality and other related aspects. Here the questions can be asked are of a varied range starting from your introduction, qualification, experience, hobbies, strengths & weaknesses, salary expectations, etc. In this round, company-related questions on Accenture can also be asked. While the other interview rounds at Accenture gauge your skills and accomplishments, the objective of an HR interview is to judge your personality, check your background, and ability to handle the job role, and decide whether you are the right fit for the company.
人力资源面试:人力资源面试是埃森哲选拔候选人成为员工的最终环节,因为它有助于确定候选人的个性及其他相关方面。这里可能会问到的问题范围广泛,从你的自我介绍、学历、经验、爱好、优缺点、薪资期望等开始。在这一轮中,也可能会问到关于埃森哲公司的相关问题。虽然埃森哲的其他面试轮次衡量你的技能和成就,但人力资源面试的目标是评判你的个性、检查你的背景、处理工作角色的能力,并决定你是否适合这家公司。
989. Interview Process
面试流程
- 知识点: 其他/未分类 (标签: interviewbit, accenture, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Accenture
- id: 69b3791a58d557c902b97350 | 官方: 否 | 付费: 否
答案:
The Accenture interview process is a little challenging as per the experience shared by some of the previously interviewed candidates. The candidates are often daunted by the tough questions in every interview rounds at Accenture, as the number of applications received would be a little high. Hence a thoughtful preparation strategy and consistent practice can definitely enable you to crack this interview process.
根据一些先前面试过的候选人的经验分享,埃森哲的面试过程有点具有挑战性。由于收到的申请数量可能较高,候选人在埃森哲的每轮面试中常被棘手问题所困扰。因此,周密的准备策略和持续的练习肯定能帮助你成功通过这一面试流程。
First of all, the academic criteria to apply for an Accenture interview is as below: - Candidates possessing a relevant graduate degree with an aggregate of 65% are eligible.
首先,申请埃森哲面试的学术标准如下:- 拥有相关本科学位且总分达到65%的候选人符合资格。
- Candidate should be passed in all the subjects and not have an active backlog.
The education gap should not be more than one year in between your studies.
Usually, the interview process at Accenture involves the following three rounds:通常,埃森哲的面试流程包括以下三轮:
Online Assessment Test 2. Technical Interview 3. HR Interview
- 在线评估测试 2. 技术面试 3. 人力资源面试
For experienced candidates also, the Accenture interview rounds will normally remain the same. But in the case of some important roles, you may have to face two or more rounds of technical interviews followed by an HR interview.
对于有经验的候选人,埃森哲的面试轮次通常也保持不变。但在某些重要职位的情况下,你可能需要在人力资源面试之前面对两轮或更多轮的技术面试。
990. Is it difficult to get a job at Adobe?
在Adobe找到工作难吗?
- 知识点: 其他/未分类 (标签: interviewbit, adobe, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Adobe
- id: 69b3791c58d557c902b9747d | 官方: 否 | 付费: 否
答案:
There are both difficult and easy questions throughout the interview. Adobe's interview method differs little from that of other organisations. Even when hiring seasoned engineers, they conduct written tests. Overall, Adobe's approach is one of the most difficult.
整个面试中既有困难也有简单的问题。Adobe的面试方法与其他组织差别不大。即使在招聘经验丰富的工程师时,他们也进行笔试。总体而言,Adobe的方法是最难的之一。
991. What is Adobe assessment
什么是Adobe评估
- 知识点: 其他/未分类 (标签: interviewbit, adobe, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Adobe
- id: 69b3791c58d557c902b97480 | 官方: 否 | 付费: 否
答案:
The written assessment has a total time limit of 120 minutes. The Verbal Ability, Quantitative Aptitude, and Analytical Reasoning parts of the Aptitude Test are divided into three divisions.
书面评估总时限为120分钟。能力倾向测试中的语言能力、定量能力和分析推理部分分为三个部分。
- Data Science
- All Events
- My Events
992. Does Adobe recruit in India?
Adobe在印度招聘吗?
- 知识点: 其他/未分类 (标签: interviewbit, adobe, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Adobe
- id: 69b3791c58d557c902b97483 | 官方: 否 | 付费: 否
答案:
Adobe is now employing a large number of freshers as well as 2019/2020, 2021, and 2022 graduates across India, mostly in Hyderabad, Chennai, Bangalore, Mysore, Cochin, Maharashtra, Mumbai, Delhi, and Coimbatore.
Adobe目前正在印度各地大量招聘应届毕业生以及2019/2020、2021和2022届毕业生,主要集中在海得拉巴、金奈、班加罗尔、迈索尔、科钦、马哈拉施特拉邦、孟买、德里和哥印拜陀。
993. Does Adobe hire off campus?
Adobe是否招聘非校园候选人?
- 知识点: 其他/未分类 (标签: interviewbit, adobe, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Adobe
- id: 69b3791c58d557c902b97486 | 官方: 否 | 付费: 否
答案:
Yes, Adobe does hire off-campus. The following steps should be followed: - Visit Adobe's official website at adobe.com.
是的,Adobe确实招聘非校园候选人。应遵循以下步骤:- 访问Adobe官方网站adobe.com。
- Select Adobe Careers from the drop-down menu.
- Below you will see some blank information.
- Full-time/part-time, job category, location, and job type
- Then press the Submit button.
994. How many rounds of interviews does Adobe have?
Adobe的面试有多少轮?
- 知识点: 其他/未分类 (标签: interviewbit, adobe, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Adobe
- id: 69b3791c58d557c902b97489 | 官方: 否 | 付费: 否
答案:
There will be four rounds of technical interviews and one final HR round. Each round is an elimination round; if you're dismissed early, you'll receive no offers.
共有四轮技术面试和一轮最终HR面试。每轮都是淘汰制;如果你提前被淘汰,将不会收到任何录用通知。
995. What is the culture of Adobe?
Adobe的文化是怎样的?
- 知识点: 其他/未分类 (标签: interviewbit, adobe, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Adobe
- id: 69b3791c58d557c902b9748c | 官方: 否 | 付费: 否
答案:
Adobe's business culture has won numerous awards. Adobe invests in its employees and the community with a strong sense of corporate responsibility, in addition to substantial employee incentives. Businesses may recall what's important by defining fundamental company principles.
Adobe的企业文化赢得了众多奖项。Adobe投资于员工和社区,具有较强的企业责任感,同时也提供丰厚的员工激励。企业可以通过定义基本原则来提醒自己什么才是重要的。
996. How long will the interview process take?
面试过程需要多长时间?
- 知识点: 其他/未分类 (标签: interviewbit, adobe, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Adobe
- id: 69b3791c58d557c902b9748f | 官方: 否 | 付费: 否
答案:
It generally takes 1.5 months to complete the entire interview process.
整个面试过程通常需要1.5个月才能完成。
997. What’s the average salary for a software engineer?
软件工程师的平均工资是多少?
- 知识点: 其他/未分类 (标签: interviewbit, adobe, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Adobe
- id: 69b3791c58d557c902b97492 | 官方: 否 | 付费: 否
答案:
The expected average salary an engineer can expect is $110000 per annum.
工程师可预期的平均工资为每年11万美元。
Coding Problems
0/1
Easy Problems
简单问题
Arrays
数组
Spiral Order Matrix I
螺旋顺序矩阵 I
Easy
简单
68.0 Mins
68.0 分钟
Solve
解答
0/9
Intermediate Problems
中级问题
Stacks And Queues
栈和队列
Math
数学
Backtracking
回溯法
Two Pointers
双指针
Strings
字符串
Min Stack
最小栈
Medium
中等
43.31 Mins
43.31 分钟
Solve
解答
Grid Unique Paths
网格唯一路径
Medium
中等
32.35 Mins
32.35 分钟
Solve
解答
Combination Sum
组合总和
Medium
中等
62.41 Mins
62.41 分钟
Solve
解答
Permutations
排列
Medium
中等
39.38 Mins
39.38 分钟
Solve
解答
Combinations
组合
Medium
中等
46.9 Mins
46.9分钟
Solve
解答
Merge Two Sorted Lists II
合并两个有序链表 II
Medium
中等
25.38 Mins
25.38分钟
Solve
解答
Container With Most Water
盛最多水的容器
Medium
中等
48.25 Mins
48.25分钟
Solve
解答
Valid Number
有效数字
Medium
中等
59.47 Mins
59.47分钟
Solve
解答
Atoi
字符串转整数
Medium
中等
52.19 Mins
52.19分钟
Solve
解答
998. What are the Amazon interview rounds?
亚马逊的面试环节有哪些?
- 知识点: 其他/未分类 (标签: interviewbit, amazon, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: 亚马逊
- id: 69b3792b58d557c902b98299 | 官方: 否 | 付费: 否
答案:
There are 5 rounds (4- Data Structures and Algorithms, 1- System Design, and 1- HR) at Amazon.
亚马逊的面试有5轮(其中4轮-数据结构和算法,1轮-系统设计,以及1轮-人力资源)。
999. Are Amazon interviews hard?
亚马逊的面试难吗?
- 知识点: 其他/未分类 (标签: interviewbit, amazon, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: 亚马逊
- id: 69b3792b58d557c902b9829c | 官方: 否 | 付费: 否
答案:
The toughness of an interview depends upon the amount of hard work you have put in to prepare for them. Usually, the questions asked in a standard Amazon interview are of Easy to Medium Level but it varies from person to person.
面试的难度取决于你为准备面试所付出的努力程度。通常,标准亚马逊面试中提出的问题难度为简单到中等,但具体情况因人而异。
1000. How do I apply for a job at Amazon?
如何申请亚马逊的工作?
- 知识点: 其他/未分类 (标签: interviewbit, amazon, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: 亚马逊
- id: 69b3792b58d557c902b9829f | 官方: 否 | 付费: 否
答案:
You can go to the Amazon Jobs portal and apply for any open role matching your skill set over there.
您可以访问Amazon Jobs门户网站,申请任何与您技能匹配的空缺职位。
1001. Can I apply for multiple roles at Amazon?
我可以申请Amazon的多个职位吗?
- 知识点: 其他/未分类 (标签: interviewbit, amazon, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: 亚马逊
- id: 69b3792b58d557c902b982a2 | 官方: 否 | 付费: 否
答案:
Yes, we can apply to any role that aligns with both our interests and skills. We are evaluated against the requirements for each role and we can give interviews for different roles at the same time.
是的,我们可以申请任何既符合我们兴趣又符合技能的角色。我们会根据每个职位的要求被评估,并且我们可以同时参加不同职位的面试。
1002. What are some of the questions which one should ask the interviewer at Amazon?
在Amazon面试时,应该向面试官询问哪些问题?
- 知识点: 其他/未分类 (标签: interviewbit, amazon, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: 亚马逊
- id: 69b3792b58d557c902b982a5 | 官方: 否 | 付费: 否
答案:
It is always nice to ask questions about the company's culture and what is the current technology using which the company makes its products. Asking about the future innovations at Amazon also might be a good idea as it might make the interviewer believe that you are looking forward to joining Amazon for a long time. You can also ask about the interviewer's personal experience at Amazon and what skills you must develop before you join the job.
询问关于公司文化以及公司当前用于制造产品的技术总是很好的。询问Amazon未来的创新也可能是个好主意,因为这可能会让面试官认为您期待长期加入Amazon。您还可以询问面试官在Amazon的个人经验,以及在您入职前必须培养哪些技能。
1003. How to prepare for the coding interviews at Amazon?
如何准备Amazon的编码面试?
- 知识点: 其他/未分类 (标签: interviewbit, amazon, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: 亚马逊
- id: 69b3792b58d557c902b982a8 | 官方: 否 | 付费: 否
答案:
The secret lies in the amount of practice you do. Put in a lot of effort in solving challenging problems on Data Structures and Algorithms. Having a good knowledge of fundamental Computer Science Concepts like Object-Oriented Programming, Computer Networks, Operating Systems, etc. might also be helpful.
秘诀在于您所做的练习量。投入大量精力解决数据结构和算法方面的挑战性问题。扎实掌握基础计算机科学概念,如面向对象编程、计算机网络、操作系统等,也可能会有帮助。
1004. Does Amazon have a dress code?
Amazon有着装要求吗?
- 知识点: 其他/未分类 (标签: interviewbit, amazon, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: 亚马逊
- id: 69b3792b58d557c902b982ab | 官方: 否 | 付费: 否
答案:
No, Amazon does not have a dress code. However, all employees are supposed to wear decent clothes at their respective places of work.
没有,Amazon没有着装要求。然而,所有员工都应在各自的工作场所穿着得体。
1005. Eligibility Criteria.
资格标准
- 知识点: 其他/未分类 (标签: interviewbit, apisero, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Apisero
- id: 69b3793b58d557c902b99180 | 官方: 否 | 付费: 否
答案:
Most other companies' fresher qualifying standards are equal to Apisero's. Before applying for the Apisero Recruitment Process, candidates should review the following eligibility criteria (both graduation and general criteria):
大多数其他公司的应届生合格标准与Apisero相同。在申请Apisero招聘流程之前,候选人应审查以下资格标准(包括毕业标准和一般标准):
Graduation Criteria: The graduation criteria for the Apisero Recruitment Process are as follows:-
毕业标准:Apisero招聘流程的毕业标准如下:-
| Criterion for Graduation 毕业标准 | Details 详情 |
|---|---|
| Department/Branch of Study 学习院系/分支 | Bachelor’s Degree in Computer Science or related areas like in one of the following disciplines: CSE/ECE/IT/EEE/TELECOM/EI or Master's Degree in Computer Science. 计算机科学学士学位或相关领域,如以下学科之一:CSE/ECE/IT/EEE/TELECOM/EI 或计算机科学硕士学位。 |
| Mode of Study 学习方式 | The Central or State governments of India recognised full-time courses. (Not the accessible part-time or correspondence courses.) 印度中央或州政府认可的全日制课程。(不包括非全日制的业余或函授课程。) |
| Backlogs 未通过科目 | No Active Backlogs should be there during the Apisero Recruitment Process. 在 Apisero 招聘流程期间不得有未通过的待修科目。 |
General Criteria (or General Skills Required): A candidate, for a job at Apisero, must possess a set of general skills. The following are a few of them:- - Excellent interpersonal and communication skills.
通用标准(或所需通用技能):申请 Apisero 职位的候选人必须具备一套通用技能。以下是其中一些:- - 优秀的人际交往和沟通能力。
- Expertise in the technical domain.
- Professional attitude towards work.
- Excellent organizational skills and attention to detail.
1006. Is Directi a good company to work for?
Directi 是一家值得工作的好公司吗?
- 知识点: 其他/未分类 (标签: interviewbit, directi, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Directi
- id: 69b37a7958d557c902ba7069 | 官方: 否 | 付费: 否
答案:
Yes, Directi is amongst the biggest technology-centric, Internet company India catering to a global audience. With over 1550+ employees and across 8 offices in the USA, India, and UAE, Directi has a turnover of billions. Plus, the work culture at Directi is friendly and open, and amazing employee benefits and perks for the employees. Besides, the monetary and work atmosphere, your learning and growth will surely improve here.
是的,Directi 是印度最大的以技术为核心的互联网公司之一,服务于全球受众。Directi 拥有超过 1550 名员工,并在美国、印度和阿联酋设有 8 个办事处,营业额达数十亿。此外,Directi 的工作文化友好开放,员工享有优厚的福利和津贴。除了薪酬和工作氛围外,在这里你的学习和成长一定会得到提升。
1007. How many rounds of interviews does Facebook have?
Facebook 的面试有多少轮?
- 知识点: 其他/未分类 (标签: interviewbit, directi, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Directi
- id: 69b37a7958d557c902ba706c | 官方: 否 | 付费: 否
答案:
There are 4-5 Rounds: MCQ Round, Directi Codechef Coding Round, Technical Interview Round- 2, and HR Round.
共有 4-5 轮:选择题轮、Directi Codechef 编码轮、技术面试轮(2 轮)和人力资源轮。
1008. Are Directi and Media.net the same?
Directi 和 Media.net 是同一家公司吗?
- 知识点: 其他/未分类 (标签: interviewbit, directi, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Directi
- id: 69b37a7958d557c902ba706f | 官方: 否 | 付费: 否
答案:
Media.net was founded by Divyank Turakhia, CEO of Directi. But in 2016, the company was acquired by Miteno Communication Technology (also known as Shuzhi.AI), a Chinese consortium for 900 million UDS. So, Media.net was under the umbrella of many organizations by Divyank but, as of 2016, it is part of the Chinese corporation.
Media.net 由 Directi 的首席执行官 Divyank Turakhia 创立。但在 2016 年,该公司被中国财团 Miteno Communication Technology(也称为 Shuzhi.AI)以 9 亿美元收购。因此,Media.net 曾隶属于 Divyank 旗下的多家组织,但截至 2016 年,它已成为该中国公司的一部分。
1009. How do I prepare for the Directi interview?
我如何准备 Directi 面试?
- 知识点: 其他/未分类 (标签: interviewbit, directi, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Directi
- id: 69b37a7958d557c902ba7072 | 官方: 否 | 付费: 否
答案:
To prepare for the Directi interview process, - Practice (Coding Questions)
为了准备 Directi 面试流程,- 练习(编码题)
- Follow these (Tips)
Coding Problems
0/3
Easy Problems
简单问题
Dynamic Programming
动态规划
Hashing
哈希
Arrays
数组
Unique Binary Search Trees
唯一二叉搜索树
Easy
简单
62.1 Mins
62.1 分钟
Solve
解答
Longest Consecutive Sequence
最长连续序列
Easy
简单
58.7 Mins
58.7 分钟
Solve
解答
Min Steps in Infinite Grid
无限网格中的最小步数
Easy
简单
37.51 Mins
37.51 分钟
Solve
解答
0/5
Intermediate Problems
中级问题
Dynamic Programming
动态规划
Arrays
数组
Hashing
哈希
Max Sum Path in Binary Tree
二叉树中的最大路径和
Medium
中等
55.23 Mins
55.23 分钟
Solve
解答
Unique Binary Search Trees II
唯一二叉搜索树 II
Medium
中等
36.39 Mins
36.39 分钟
Solve
解答
Merge Overlapping Intervals
合并重叠区间
Medium
中等
48.24 Mins
48.24 分钟
Solve
解答
Window String
窗口字符串
Medium
中等
82.25 Mins
82.25分钟
Solve
解答
Intersecting Chords in a Circle
圆内相交弦
Medium
中等
70.40 Mins
70.40 分钟
Solve
解答
0/2
Advanced Problems
进阶问题
Dynamic Programming
动态规划
Strings
字符串
Regular Expression Match
正则表达式匹配
Hard
困难
80.12 Mins
80.12 分钟
Solve
解答
Justified Text
两端对齐文本
Hard
困难
79.35 Mins
79.35分钟
Solve
解答
1010. How many rounds of interview does Facebook have?
Facebook的面试有几轮?
- 知识点: 其他/未分类 (标签: interviewbit, facebook, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Meta(原 Facebook)
- id: 69b37aef58d557c902bab69b | 官方: 否 | 付费: 否
答案:
There are about 6-7 Rounds: Phone Screenings(Two Rounds), and Algo DS Interviews (Four or Five Rounds).
大约有6-7轮:电话筛选(两轮),以及算法与数据结构面试(四或五轮)。
1011. Why do you want to work at Facebook?
你为什么想加入Facebook?
- 知识点: 其他/未分类 (标签: interviewbit, facebook, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Meta(原 Facebook)
- id: 69b37aef58d557c902bab69e | 官方: 否 | 付费: 否
答案:
Most large tech companies ask this question during an interview process and Facebook is no different. Be specific about the things you want to do, rather than something vague. Talk about the company-specific products that interest you and what kind of work you look forward to doing.
大多数大型科技公司在面试过程中都会问这个问题,Facebook也不例外。要具体说明你想做的事情,而不是含糊其辞。谈谈你感兴趣的公司特定产品,以及你期待从事的工作类型。
- Data Science
- All Events
- My Events
1012. Is it hard to get hired at Facebook?
在Facebook找工作难吗?
- 知识点: 其他/未分类 (标签: interviewbit, facebook, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Meta(原 Facebook)
- id: 69b37aef58d557c902bab6a4 | 官方: 否 | 付费: 否
答案:
The Facebook recruitment process is designed to be intricate and arduous, but not to fail you. The process will be hard for those who prepare it overnight and wait for a miracle to happen.
Facebook的招聘流程设计得复杂且艰巨,但并不是为了让你失败。对于那些临时抱佛脚、指望奇迹发生的人来说,这个过程会很艰难。
Otherwise, at the Facebook company, they even give you all the prepping material and, mock interview trial runs. They want every interviewee to experience the beauty of this process and brace themselves for the Facebook coding challenge and for the environment at the company. Besides, they want you to discover yourself in that process.
否则,在Facebook公司,他们甚至会提供所有准备材料和模拟面试试运行。他们希望每位面试者都能体验这一过程的精彩之处,并为Facebook的编程挑战和公司环境做好准备。此外,他们希望你在这一过程中发现自我。
1013. What are the different levels of software engineers at Facebook?
Facebook的软件工程师有哪些不同的级别?
- 知识点: 其他/未分类 (标签: interviewbit, facebook, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Meta(原 Facebook)
- id: 69b37aef58d557c902bab6a7 | 官方: 否 | 付费: 否
答案:
There are 6 levels of software engineer titles at Facebook.
Facebook有6个级别的软件工程师职称。
Software Engineer Level I (E3) 2. Software Engineer Level II (E4) 3. Software Engineer Level III (E5) 4. Software Engineer Level IV (E6) 5. Software Engineer Level V (E7) 6. Software Engineer Level VI (E8)
- 软件工程师一级(E3) 2. 软件工程师二级(E4) 3. 软件工程师三级(E5) 4. 软件工程师四级(E6) 5. 软件工程师五级(E7) 6. 软件工程师六级(E8)
However, at Facebook the engineer regardless of whatever level is called a software engineer only.
然而,在Facebook,无论级别如何,工程师都只被称为软件工程师。
1014. How can I get a job at Facebook?
我怎样才能在Facebook获得一份工作?
- 知识点: 其他/未分类 (标签: interviewbit, facebook, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Meta(原 Facebook)
- id: 69b37aef58d557c902bab6aa | 官方: 否 | 付费: 否
答案:
You can check out the Facebook careers page for an opening position in any of the locations of the company. You could filter out according to the category, role and location. The process of screening, interview process and everything can take up to approximately 90 days. According to your skill and interest, you can apply for 3 job positions after a gap of 90 days in each. After applying, wait for interviews after resume shortlisting and then start preparing.
你可以查看Facebook的职业页面,查找公司在任何地点的空缺职位。你可以根据类别、职位和地点进行筛选。筛选过程、面试流程等总共可能需要大约90天。根据你的技能和兴趣,每间隔90天你可以申请3个职位。申请后,等待简历筛选后的面试通知,然后开始准备。
1015. What are the benefits of working at Facebook?
在Facebook工作有哪些福利?
- 知识点: 其他/未分类 (标签: interviewbit, facebook, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Meta(原 Facebook)
- id: 69b37aef58d557c902bab6ad | 官方: 否 | 付费: 否
答案:
There are several benefits of working at a company of such scale and magnitude. Starting from salaries that are very competitive to be able to contribute to building a product that millions use every day, the experience of working at Facebook has been known to be enriching for many.
在如此规模和量级的公司工作有诸多福利。从极具竞争力的薪资到能为每天数百万用户使用的产品贡献力量,在Facebook工作的经历对许多人来说都是充实而有意义的。
1016. What are the mistakes to avoid during a Facebook interview?
在Facebook面试中应避免哪些错误?
- 知识点: 其他/未分类 (标签: interviewbit, facebook, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Meta(原 Facebook)
- id: 69b37aef58d557c902bab6b0 | 官方: 否 | 付费: 否
答案:
Don’t appear underconfident, and be sure to follow the aforementioned tips while preparing for an interview at the company.
不要表现出缺乏自信,并务必在准备该公司面试时遵循上述提示。
Coding Problems
0/2
Easy Problems
简单问题
Dynamic Programming
动态规划
Best Time to Buy and Sell Stocks II
买卖股票的最佳时机 II
Easy
简单
40.18 Mins
40.18分钟
Solve
解答
Best Time to Buy and Sell Stocks I
买卖股票的最佳时机 I
Easy
简单
28.13 Mins
28.13分钟
Solve
解答
0/5
Intermediate Problems
中级问题
Dynamic Programming
动态规划
Linked Lists
链表
Longest Increasing Subsequence
最长递增子序列
Medium
中等
30.39 Mins
30.39分钟
Solve
解答
Unique Paths in a Grid
网格中的唯一路径
Medium
中等
34.8 Mins
34.8分钟
Solve
解答
Ways to Decode
解码方法
Medium
中等
70.8 Mins
70.8分钟
Solve
解答
Add Two Numbers as Lists
两个数字列表相加
Medium
中等
43.7 Mins
43.7 分钟
Solve
解答
Reverse Link List II
反转链表 II
Medium
中等
57.24 Mins
57.24 分钟
Solve
解答
0/3
Advanced Problems
进阶问题
Dynamic Programming
动态规划
Best Time to Buy and Sell Stocks III
买卖股票的最佳时机 III
Hard
困难
64.56 Mins
64.56 分钟
Solve
解答
Regular Expression Match
正则表达式匹配
Hard
困难
80.12 Mins
80.12 分钟
Solve
解答
Regular Expression II
正则表达式 II
Hard
困难
71.24 Mins
71.24 分钟
Solve
解答
1017. How many interview rounds are there in Flipkart?
Flipkart有多少轮面试?
- 知识点: 其他/未分类 (标签: interviewbit, flipkart, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Flipkart
- id: 69b37af858d557c902babc06 | 官方: 否 | 付费: 否
答案:
There are typically three rounds for an SDE intern position, and five rounds as described below for full-time SDE positions at Flipkart.
Flipkart的SDE实习生职位通常有三轮面试,全职SDE职位则有五轮,详情如下所述。
1018. How to join Flipkart as a software developer engineer?
如何以软件工程师身份加入Flipkart?
- 知识点: 其他/未分类 (标签: interviewbit, flipkart, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Flipkart
- id: 69b37af858d557c902babc0b | 官方: 否 | 付费: 否
答案:
- To get a job at Flipkart keep a watch out for multiple opportunities for college students on platforms like LinkedIn, Dare2Compete & more. You can always visit their company page to apply directly. Also, as mentioned above, you can always take a referral from an existing employee at Flipkart.
- Follow each and every tip mentioned above, you will ace it.
- Data Science
- All Events
- My Events
1019. What is the salary of a software engineer in Flipkart?
Flipkart软件工程师的薪资是多少?
- 知识点: 其他/未分类 (标签: interviewbit, flipkart, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Flipkart
- id: 69b37af858d557c902babc0e | 官方: 否 | 付费: 否
答案:
The average annual salary of an SDE at Flipkart is 25 LPA. Here is a chart with the salary of SDE at Flipkart according to experience.
Flipkart的SDE平均年薪为25 LPA。以下是按经验划分的Flipkart SDE薪资图表。
1020. How can I prepare for Flipkart?
我该如何为Flipkart做准备?
- 知识点: 其他/未分类 (标签: interviewbit, flipkart, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Flipkart
- id: 69b37af858d557c902babc11 | 官方: 否 | 付费: 否
答案:
All the information mentioned above is enough to crack an SDE internship/job at Flipkart. In addition to this, regular coding practice, mock interviews and preparation would increase your chances.
上述所有信息足以让你在Flipkart获得SDE实习或工作。此外,定期进行编码练习、模拟面试和准备将增加你的机会。
1021. Is flipkart a good company to work for?
Flipkart是一家值得工作的好公司吗?
- 知识点: 其他/未分类 (标签: interviewbit, flipkart, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Flipkart
- id: 69b37af858d557c902babc14 | 官方: 否 | 付费: 否
答案:
Flipkart has an amazing work culture, ethics, and values. Flipkart is also one of the largest e-commerce establishments. Throughout the pandemic as well, they helped their employees at every stage. It is definitely one of the best companies to work for!
Flipkart拥有极佳的工作文化、道德和价值观。Flipkart也是最大的电子商务企业之一。即使在疫情期间,他们也在各个阶段帮助员工。这绝对是一家最值得工作的公司之一!
1022. Why do you want to work for Flipkart?
你为什么想为 Flipkart 工作?
- 知识点: 其他/未分类 (标签: interviewbit, flipkart, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Flipkart
- id: 69b37af858d557c902babc17 | 官方: 否 | 付费: 否
答案:
It is one of the fastest growing companies in India with a very reliable working time and working benefits. E-commerce is one of the best opportunities for the future, and one can also learn a lot from them.
它是印度增长最快的公司之一,拥有非常可靠的工作时间和工作福利。电子商务是未来的最佳机遇之一,也能从中学习到很多东西。
1023. What is the eligibility criteria for Flipkart?
Flipkart 的资格标准是什么?
- 知识点: 其他/未分类 (标签: interviewbit, flipkart, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Flipkart
- id: 69b37af858d557c902babc1a | 官方: 否 | 付费: 否
答案:
Minimum Qualification requirements would be BE/B.Tech/ME/M.Tech – CSE, IT, ECE with 60% or 6.5 GPA and above throughout without any running backlogs. These are just general criteria for on-campus placements, people from any other branch with a knack for programming can apply for the same as well.
最低学历要求为 BE/B.Tech/ME/M.Tech(计算机科学、信息技术、电子与通信工程专业),成绩需达到60%或GPA 6.5及以上,且无未清除的挂科记录。这些仅是校园招聘的一般标准,其他专业但具备编程能力的人也可以申请。
Coding Problems
0/2
Easy Problems
简单问题
Arrays
数组
Hashing
哈希
Spiral Order Matrix I
螺旋顺序矩阵 I
Easy
简单
68.0 Mins
68.0 分钟
Solve
解答
Longest Consecutive Sequence
最长连续序列
Easy
简单
58.7 Mins
58.7 分钟
Solve
解答
0/7
Intermediate Problems
中级问题
Greedy Algorithm
贪心算法
Dynamic Programming
动态规划
Hashing
哈希
Binary Search
二分查找
Gas Station
加油站
Medium
中等
56.42 Mins
56.42分钟
Solve
解答
Distribute Candy
分发糖果
Medium
中等
65.48 Mins
65.48分钟
Solve
解答
Min Sum Path in Matrix
矩阵中的最小路径和
Medium
中等
30.33 Mins
30.33分钟
Solve
解答
Edit Distance
编辑距离
Medium
中等
47.1 Mins
47.1 分钟
Solve
解答
Window String
窗口字符串
Medium
中等
82.25 Mins
82.25分钟
Solve
解答
Allocate Books
分配书籍
Medium
中等
68.1 Mins
68.1分钟
Solve
解答
Length of Longest Subsequence
最长子序列长度
Medium
中等
65.1 Mins
65.1分钟
Solve
解答
0/1
Advanced Problems
进阶问题
Heaps And Maps
堆与映射
Merge K Sorted Lists
合并K个有序链表
Hard
困难
43.44 Mins
43.44分钟
Solve
解答
1024. How many rounds are there in Google Interview?
谷歌面试中有多少轮?
- 知识点: 其他/未分类 (标签: interviewbit, google, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Google
- id: 69b37b1558d557c902baccc8 | 官方: 否 | 付费: 否
答案:
There are 6-7 (Telephonic Interviews - 2 Rounds, DS & Algo Interviews - 3 or 4 Rounds, Googliness Interviews -1 Round).
共有6-7轮(电话面试-2轮,数据结构和算法面试-3或4轮,谷歌文化面试-1轮)。
1025. Why do you want to join Google?
你为什么想加入谷歌?
- 知识点: 其他/未分类 (标签: interviewbit, google, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Google
- id: 69b37b1558d557c902bacccb | 官方: 否 | 付费: 否
答案:
There are a lot of high-quality products that Google employees work on every day and the amount of opportunity that Google presents its employees is humongous. Also, the work culture is really good over there and the compensation offered to Google employees is on the higher end of the standards of the Information Technology or Software Industry.
谷歌员工每天开发的优质产品非常多,而且谷歌为员工提供的机会也极其巨大。此外,那里的工作文化非常好,谷歌提供给员工的薪酬也处于信息技术或软件行业标准的高端水平。
1026. Are Google interviews hard?
谷歌面试难吗?
- 知识点: 其他/未分类 (标签: interviewbit, google, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Google
- id: 69b37b1558d557c902baccd0 | 官方: 否 | 付费: 否
答案:
The toughness of an interview depends upon the amount of hard work you have put in to prepare for them. Usually, the questions asked in a standard Google interview are of Easy to Medium Level but it varies from person to person. Since the number of interview rounds ranges anywhere from four to seven, it can be intimidating at times for a candidate. But if you are in, it is going to be worth the effort.
面试的难度取决于你为准备面试付出了多少努力。通常,标准谷歌面试中提出的问题难度为简单到中等水平,但这因人而异。由于面试轮次的数量从四轮到七轮不等,有时对候选人来说可能令人望而生畏。但如果你成功通过,这一切努力都是值得的。
1027. Can I apply for multiple roles at Google?
我可以申请谷歌的多个职位吗?
- 知识点: 其他/未分类 (标签: interviewbit, google, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Google
- id: 69b37b1558d557c902baccd8 | 官方: 否 | 付费: 否
答案:
Yes, we can apply to any role that aligns with both our interests and skills. We are evaluated against the requirements for each role and we can give interviews for different roles at the same time. But one should note that within a span of thirty days, one can apply only for three roles at Google.
可以,我们可以申请任何与我们的兴趣和技能相匹配的职位。我们会根据每个职位的要求进行评估,并且可以同时参加不同职位的面试。但需要注意的是,在三十天内,一个人只能申请谷歌的三个职位。
1028. What are some of the questions which one should ask the interviewer at Google?
在谷歌面试中,有哪些问题应该向面试官提问?
- 知识点: 其他/未分类 (标签: interviewbit, google, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Google
- id: 69b37b1558d557c902baccdc | 官方: 否 | 付费: 否
答案:
It is always nice to ask questions about the company’s culture and what is the current technology using which the company makes its products. Asking about the future innovations at Google also might be a good idea as it might make the interviewer believe that you are looking forward to joining Google for a long time. You can also ask about the interviewer’s personal experience at Google and what skills you must develop before you join the job.
询问关于公司文化以及公司目前用于开发产品的技术总是很好的。询问谷歌未来的创新可能也是个好主意,因为这可能会让面试官认为你期待长期加入谷歌。你还可以询问面试官在谷歌的个人经验,以及你在入职前需要发展哪些技能。
1029. What is Googleyness?
什么是谷歌范儿(Googleyness)?
- 知识点: 其他/未分类 (标签: interviewbit, google, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Google
- id: 69b37b1558d557c902baccdf | 官方: 否 | 付费: 否
答案:
Googleyness can be thought of as a set of qualities that makes one stand out from the pack and fit into the unique work culture of Google. However, this term has not been officially confirmed by Google. Some of these qualities are as follows - - Striving for excellence and doing the right thing.
谷歌范儿可以被看作是一系列让你脱颖而出并融入谷歌独特工作文化的品质。然而,这个术语尚未得到谷歌的官方确认。这些品质包括以下几点:- - 追求卓越并做正确的事。
- Keeping an eye on the goals.
- Being proactive and ready to go the extra mile.
- Doing something nice for others, without expecting anything in return.
- Valuing users and colleagues and rewarding great performance.
Being transparent, honest, and fair.
Coding Problems
0/1
Easy Problems
简单问题
Greedy Algorithm
贪心算法
Majority Element
多数元素
Easy
简单
19.7 Mins
19.7分钟
Solve
解答
0/7
Intermediate Problems
中级问题
Greedy Algorithm
贪心算法
Dynamic Programming
动态规划
Gas Station
加油站
Medium
中等
56.42 Mins
56.42分钟
Solve
解答
Max Rectangle in Binary Matrix
二进制矩阵中的最大矩形
Medium
中等
79.30 Mins
79.30分钟
Solve
解答
Distinct Subsequences
不同子序列
Medium
中等
65.51 Mins
65.51 分钟
Solve
解答
Palindrome Partitioning II
回文分割 II
Medium
中等
63.9 Mins
63.9 分钟
Solve
解答
Min Jumps Array
最小跳跃数组
Medium
中等
71.56 Mins
71.56 分钟
Solve
解答
Edit Distance
编辑距离
Medium
中等
47.1 Mins
47.1 分钟
Solve
解答
Word Break
单词拆分
Medium
中等
68.35 Mins
68.35 分钟
Solve
解答
0/2
Advanced Problems
进阶问题
Dynamic Programming
动态规划
Regular Expression II
正则表达式 II
Hard
困难
71.24 Mins
71.24 分钟
Solve
解答
Interleaving Strings
交错字符串
Hard
困难
62.22 Mins
62.22 分钟
Solve
解答
1030. How method overloading is different from method overriding?
方法重载与方法重写有何不同?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5758d557c902baf358 | 官方: 否 | 付费: 否
答案:
Method overloading means methods are having the same name, but they differ either in the number of arguments or in the type of arguments. It is done during compile time, so it is known as compile-time polymorphism.
方法重载是指方法具有相同的名称,但它们在参数数量或参数类型上有所不同。它是在编译时完成的,因此被称为编译时多态。
Method overriding means the ability to define subclass and super-class methods with the same name as well as the same method signatures, here the subclass method will override the super-class method. It is performed during run time, so it is known as run-time polymorphism.
方法重写是指定义与超类方法具有相同名称和相同方法签名的子类和超类方法的能力,其中子类方法将覆盖超类方法。它是在运行时执行的,因此被称为运行时多态。
1031. Distinguish between classes and interfaces in Java.
区分Java中的类和接口。
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5758d557c902baf35b | 官方: 否 | 付费: 否
答案:
| Class 类 | Interface 接口 |
|---|---|
| A class is a blueprint for the creation of objects with the same configuration for properties and methods 类是创建具有相同属性和方法配置的对象的蓝图 | An interface is a collection of properties and methods that helps to describe an object, but it does not provide implementation or initialization for them 接口是帮助描述对象的属性和方法的集合,但它不提供它们的实现或初始化 |
| A class will have abstract or concrete methods 类将具有抽象或具体方法 | Interface will have abstract methods only. From Java 8 onwards, it supports static as well as default methods 接口将仅具有抽象方法。从Java 8开始,它还支持静态方法和默认方法 |
| Does not support multiple inheritance. 不支持多重继承 | Multiple Inheritance is supported 支持多重继承 |
| An interface can be implemented by a class 接口可以被类实现 | Interface cannot be implemented by another interface, but it is possible to extend an interface 接口不能被另一个接口实现,但可以扩展一个接口 |
| Using extends keyword, a class can be inherited from another class 使用extends关键字,类可以继承自另一个类 | Interface cannot inherit a class, but it can inherit an interface 接口不能继承类,但可以继承接口 |
| It can have all types of members(public, private or, others) 它可以拥有所有类型的成员(公共、私有或其他) | Members are public by default, but you can use other access specifiers also for the interface members 成员默认是公共的,但您也可以为接口成员使用其他访问说明符 |
1032. Differentiate between TRUNCATE and DELETE commands in SQL.
区分SQL中的TRUNCATE和DELETE命令。
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5758d557c902baf362 | 官方: 否 | 付费: 否
答案:
| TRUNCATE | DELETE |
|---|---|
| It is used to remove all records from a database table 用于从数据库表中删除所有记录 | It is used to delete specified records(one or more) from a database table 用于从数据库表中删除指定记录(一个或多个) |
| It is a Data Definition Language(DDL) command 是数据定义语言(DDL)命令 | It is a Data Manipulation Language(DML) command 是数据操作语言(DML)命令 |
| Faster than DELETE command 比DELETE命令更快 | Slower compared to TRUNCATE command 与TRUNCATE命令相比更慢 |
| Cannot be applied for indexed views as it works only on tables 不能应用于索引视图,因为它仅适用于表 | Can be applied for indexed views 可以应用于索引视图 |
1033. Differentiate between DDL and DML commands in SQL.
区分SQL中的DDL和DML命令。
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5858d557c902baf376 | 官方: 否 | 付费: 否
答案:
| DDL(Data Definition Language) DDL(数据定义语言) | DML(Data Manipulation Language) DML(数据操作语言) |
|---|---|
| DDL is used to define database schema and also to define some constraints DDL用于定义数据库模式以及一些约束 | DML is used to manipulate the data within the database DML用于操作数据库内的数据 |
| Does not have further classification 没有进一步分类 | Classified into procedural and non-procedural DML 分为过程性和非过程性DML |
| DDL statements do not use WHERE clause DDL语句不使用WHERE子句 | DML statements use WHERE clause DML语句使用WHERE子句 |
| Examples for DDL statements are CREATE, ALTER, DROP, TRUNCATE, COMMENT, and RENAME DDL语句的示例有CREATE、ALTER、DROP、TRUNCATE、COMMENT和RENAME | Examples for DML statements are INSERT, UPDATE, and DELETE DML语句的示例有INSERT、UPDATE和DELETE |
1034. What is stored procedure?
什么是存储过程?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5858d557c902baf389 | 官方: 否 | 付费: 否
答案:
A stored procedure is a logical unit for a group of statements and is available for the applications that access an RDBMS(Relational Database Management System). These are stored in the database data dictionary. It can be used for data validation or access-control mechanisms.
存储过程是一组语句的逻辑单元,可供访问关系数据库管理系统(RDBMS)的应用程序使用。这些过程存储在数据库的数据字典中。它可用于数据验证或访问控制机制。
1035. Explain pointers in C++.
在C++中解释指针。
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5858d557c902baf38c | 官方: 否 | 付费: 否
答案:
A variable that holds the address of another variable of the same data type can be called a pointer. Pointers can be created for any data type or user-defined datatypes like class, structure, etc. It allows variable passing by references using the address. For example:
一个持有同数据类型另一个变量地址的变量可以称为指针。可以为任何数据类型或用户定义的数据类型(如类、结构体等)创建指针。它通过地址允许按引用传递变量。例如:
int x = 25;
int x = 25;
int *ptr = &x;
int *ptr = &x;
cout << ptr;
cout << ptr;
Here, ptr will store the address of x . That means the address of x is the ptr value. Using ptr , we can obtain the value stored in the address referenced by ptr(i.e., 25). ptr is known as dereference operator.
这里,ptr将存储x的地址。这意味着x的地址就是ptr的值。使用ptr,我们可以获取ptr所指向地址中存储的值(即25)。ptr被称为解引用运算符。
Uses of pointers: - To point a variable present inside the memory.
指针的用途:- 指向内存中存在的变量。
- To store addresses of dynamically allocated memory blocks.
1036. What is meant by a null pointer?
空指针是什么意思?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5858d557c902baf38f | 官方: 否 | 付费: 否
答案:
- The pointer that does not point to any memory location is called the null pointer. It implies the pointer is empty and it is not pointing to anywhere within the memory.Example: int *pointer=NULL;
- Null pointers can be used for initializing the memory location address with the pointer of the same data type.Example: int pointer= (int)NULL;
1037. What is SDLC(Software Development Life Cycle)?
什么是SDLC(软件开发生命周期)?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5858d557c902baf392 | 官方: 否 | 付费: 否
答案:
SDLC is an end-to-end process that defines the software development flow starting from the requirements stage to the maintenance and support stage. The SDLC stages are requirements analysis, planning, definition, design, development, testing, deployment, maintenance, and support.
SDLC是一个端到端的过程,它定义了从需求阶段到维护和支持阶段的软件开发流程。SDLC的各个阶段包括需求分析、规划、定义、设计、开发、测试、部署、维护和支持。
1038. What are the disadvantages of the Waterfall model?
瀑布模型的缺点是什么?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5858d557c902baf395 | 官方: 否 | 付费: 否
答案:
- Working software is produced only at the end of the life cycle
- Not suitable for complex as well as object-oriented projects.
- Difficult to measure progress within each stage
- Not recommended for the projects where requirements are frequent that may lead to a high risk of changing. So, this model is having a high amount of risk and uncertainty.
- It is difficult to identify any business or technological bottleneck or challenges early because integration is done at the end.
1039. What is DLL and EXE file extension?
什么是DLL和EXE文件扩展名?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5858d557c902baf39b | 官方: 否 | 付费: 否
答案:
- EXE file extension is used for executable files, it recognizes the file as a program. It runs independently. An EXE creates separate memory and process space for it.
- DLL stands for a dynamic link library that has functions and procedures used by other applications. This DLL can be reused by multiple applications. It will share the same memory and process space of the calling application.
1040. Differentiate between white box and black box testing.
区分白盒测试和黑盒测试。
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5858d557c902baf3a1 | 官方: 否 | 付费: 否
答案:
| White box testing 白盒测试 | Black box testing 黑盒测试 |
|---|---|
| The tester will have complete knowledge about the internal working of the application. 测试人员将完全了解应用程序的内部工作原理。 | It is not necessary to know the internal working of the application. 不需要了解应用程序的内部工作原理。 |
| It is done by developers and testers(QA). 由开发人员和测试人员(QA)执行。 | It is done by the end-user and also by developers and testers. 由最终用户以及开发人员和测试人员执行。 |
| It is more time-consuming and exhaustive. 更耗时且更详尽。 | It is less time-consuming and exhaustive. 耗时较少且详尽程度较低。 |
| Here, a tester will design test data and test cases. 这里,测试人员会设计测试数据和测试用例。 | Testing is done based on an external or end-user perspective. 测试基于外部或最终用户的视角进行。 |
| White box testing is also called an open box, glass, structural testing, clear box, or code-based testing. 白盒测试也称为开箱、玻璃、结构测试、清晰盒或基于代码的测试。 | Black box testing is also called closed box, functional, data-driven testing. 黑盒测试也称为闭箱、功能、数据驱动测试。 |
1041. Explain different levels of programming languages.
解释编程语言的不同级别。
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: coding
- 分类: general
- 公司: Infosys
- id: 69b37b5958d557c902baf3a4 | 官方: 否 | 付费: 否
答案:
The various programming language levels are given below: - Low-level Language: Language which is directly understood by the machine is known as the low-level language (binary language or machine language). It is difficult for a human being to directly read and do coding in this language.
各种编程语言级别如下:- 低级语言:机器直接理解的语言称为低级语言(二进制语言或机器语言)。人类直接阅读并用这种语言进行编码是困难的。
- Assembly level language: This language will make use of mnemonics, which minimizes the program complexity. It is quite similar to the computer understandable machine code, but it uses words in place of numbers.
- Middle-level Language: It interacts with the abstraction layer of a computer and binds the gap between high-level and machine-level language. For example, programming languages like C and C++.
- High-level language: This is the highest level of the programming language in the technology, which has strong abstraction from the computer hardware details. That means this kind of programming language does not require hardware knowledge about computers. This programming language is simple to learn by human beings as it is in the human-understandable form. For example, Java, Perl, PHP, Python, etc.
1042. How many rounds are there in Infosys placement?
Infosys 校园招聘共有多少轮?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5958d557c902baf3c8 | 官方: 否 | 付费: 否
答案:
There will be normally three rounds of interview in Infosys placement that includes: - Online Assessment Test
Infosys 校园招聘通常会有三轮面试,包括:在线评估测试
- Technical Interview
HR Interview
The recruitment process remains the same for experienced candidates also. But in the case of some critical roles, you may have to go through two rounds of technical interview followed by an HR interview.对于有经验的候选人,招聘流程也相同。但在某些关键岗位上,你可能需要经历两轮技术面试,随后再进行一轮 HR 面试。
1043. What is special about Infosys?
Infosys 有何特别之处?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5958d557c902baf3cb | 官方: 否 | 付费: 否
答案:
Unlike some of the other big giants in the IT sector, Infosys is totally an Indian-based company. Infosys has a world-class campus infrastructure and training program for its employees, which cannot even match some of the biggest MNCs. Mainly, Infosys has the best employee caring policies imbibed in their workplace. Infosys’ original team was known for good values which they insisted on in their company culture.
与 IT 行业其他一些大型巨头不同,Infosys 是一家完全以印度为基地的公司。Infosys 为其员工提供世界一流的园区基础设施和培训项目,这甚至是一些最大的跨国公司都无法比拟的。主要来说,Infosys 在工作场所中融入了最好的员工关怀政策。Infosys 的创始团队以其坚持的良好价值观而闻名,这些价值观也体现在其公司文化中。
1044. How is Infosys interview for experienced?
Infosys 对有经验者的面试是怎样的?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5958d557c902baf3ce | 官方: 否 | 付费: 否
答案:
The experienced interview process will normally have two rounds of interviews at Infosys - a Technical round and an HR round. But in the case of critical roles, you may have to face two or more rounds of technical interviews followed by an HR interview. The questions asked for experienced candidates will be a little tough compared to the freshers. But if you prepare well for these rounds, the interview would definitely go easy.
在 Infosys,有经验者的面试流程通常包括两轮面试——一轮技术面试和一轮 HR 面试。但在关键岗位上,你可能需要面对两轮或更多轮的技术面试,随后再参加 HR 面试。针对有经验候选人的问题会比应届生稍难一些。但如果你对这些环节准备充分,面试肯定会顺利进行。
1045. Why do you want to join Infosys?
你为什么想加入 Infosys?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5958d557c902baf3d1 | 官方: 否 | 付费: 否
答案:
This question can be answered by you in the following way- “Infosys is a good company to start anyone’s career, and it is also recognized as a great place to work. Apart from the opportunity of working in India’s leading tech company, a job at Infosys comes with a world-class training program, good value system, great infrastructure and facilities, robust HR policies, attractive benefits, and a friendly work environment. So these are the main reasons that I want to join Infosys.”
你可以这样回答这个问题——“Infosys 是任何一个人开启职业生涯的好公司,也被公认为一个绝佳的工作场所。除了有机会在印度领先的科技公司工作之外,在 Infosys 工作还伴随着世界一流的培训项目、良好的价值体系、卓越的基础设施和设施、健全的 HR 政策、有吸引力的福利以及友好的工作环境。因此,这些是我想加入 Infosys 的主要原因。”
1046. What qualifications and personal skills does Infosys normally look for in freshers?
Infosys 通常对应届生有何资格和个人技能要求?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5958d557c902baf3d9 | 官方: 否 | 付费: 否
答案:
While recruiting freshers, Infosys looks for a high degree of learnability in the candidates they hire. Learnability can be usually defined as the ability to obtain generic knowledge from specific experiences and apply them to new situations. Infosys also significantly focuses on professional competence and academic excellence. Some of the attributes and competencies that Infosys look for in potential candidates, especially at the entry-level, are analytical ability, communication skills, teamwork, leadership skills, and the ability to innovate.
在招聘应届生时,Infosys 会在候选人中寻找高度的学习能力。学习能力通常被定义为从特定经验中获取通用知识并应用于新情境的能力。Infosys 还非常注重专业能力和学术成就。Infosys 在潜在候选人身上寻找的一些特质和能力,特别是在入门级别,包括分析能力、沟通技巧、团队合作、领导能力和创新能力。
1047. What is InfyTQ certification?
什么是 InfyTQ 认证?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5958d557c902baf3dc | 官方: 否 | 付费: 否
答案:
InfyTQ Certification is an Infosys-initiated platform for job aspirants through which you have the opportunity to get a job in Infosys as well as be certified as “Infosys Certified Software Programmer” from Infosys. InfyTQ is not only dedicated to passed-out students but also to the students who are pursuing final year are permitted to appear for this exam. This certification is meant for the candidates who have passed various courses like BE, B.Tech., ME, M.Tech., MCA, MSc, MCM. InfyTQ Certification Program consists of a simple exam to test the knowledge in Programming and Databases.
InfyTQ 认证是 Infosys 推出的一个面向求职者的平台,通过该平台你有机会在 Infosys 获得工作,并获得 Infosys 的“Infosys 认证软件程序员”认证。InfyTQ 不仅面向已毕业的学生,正在攻读最后一年课程的学生也允许参加此考试。此认证面向已通过各类课程(如 BE、B.Tech.、ME、M.Tech.、MCA、MSc、MCM)的候选人。InfyTQ 认证项目包括一项简单的考试,用于测试编程和数据库方面的知识。
1048. How do I qualify for InfyTQ?
我如何获得参加 InfyTQ 的资格?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5958d557c902baf3df | 官方: 否 | 付费: 否
答案:
The Applicants should have below educational eligibility for the InfyTQ Certification program. - All streams of Graduation / Post Graduation – BE, B.Tech., ME, M.Tech., MSc, MCA, and MCM.
申请人应满足 InfyTQ 认证项目的以下教育资格要求:- 所有本科/研究生专业——BE、B.Tech.、ME、M.Tech.、MSc、MCA 和 MCM。
- No backlog subjects.
Minimum 60% of marks throughout the academic career.
The candidates whose score is above 65% marks in the InfyTQ exam will be considered as eligible for the post of Software Engineer and will be called for the job interview in Infosys.在 InfyTQ 考试中得分超过 65% 的候选人将被视为符合软件工程师职位的资格,并将被邀请参加 Infosys 的工作面试。
1049. What additional benefits the employees can avail themselves at Infosys?
在印孚瑟斯,员工还能享受哪些额外福利?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5958d557c902baf3e2 | 官方: 否 | 付费: 否
答案:
The various additional benefits given by Infosys include health care, in-campus entertainment, life, and medical insurance, paid leaves, and soft perks like access to campus facilities such as the gymnasium. So the benefits of working at Infosys go beyond the salaries. In addition to the brand name, Infosys offers a challenging and open work environment, wherein a fresher can expect excellent career growth backed by world-class training.
印孚瑟斯提供的各种额外福利包括医疗保健、校园内娱乐、人寿和医疗保险、带薪休假,以及诸如使用健身房等校园设施的软性福利。因此,在印孚瑟斯工作的福利远不止薪资。除了品牌知名度之外,印孚瑟斯还提供具有挑战性和开放的工作环境,新手可以在这里享受到世界级培训支撑的卓越职业发展。
1050. How is the work culture in Infosys?
印孚瑟斯的工作文化如何?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5958d557c902baf3e5 | 官方: 否 | 付费: 否
答案:
Infosys always follows a very open-minded work culture. They follow a minimal hierarchy and people are unafraid to share any new ideas. Infoscions enjoy a friendly work environment within which they need to perform their duties. Infosys essentially strive to create a workplace where the politics is kept down to a minimum level and the employees enjoy a transparent work culture.
印孚瑟斯始终遵循非常开放的工作文化。他们采用极简的层级结构,人们不怕分享任何新想法。印孚瑟斯员工享受着友好的工作环境,在其中履行自己的职责。印孚瑟斯致力于打造一个将办公室政治降到最低、员工享受透明工作文化的场所。
Infosys firmly believes that people are their core assets and they continuously work towards motivating their employees, by providing a work environment where the employees feel comfortable and secure. Infosys ensures a good work-life balance exists at all times. They have a bunch of recreational facilities on campus, which are at par with global standards. Their employee management practices set them apart from other IT companies, enabling their employees to excel and innovate in their work.
印孚瑟斯坚信员工是核心资产,他们不断努力激励员工,提供一个让员工感到舒适和安全的工作环境。印孚瑟斯确保始终有良好的工作与生活平衡。他们在园区内设有一系列娱乐设施,这些设施与全球标准持平。他们的员工管理实践使他们与其他IT公司区分开来,使员工能够出色表现并创新工作。
1051. Why should we hire you in Infosys?
为什么我们应该在印孚瑟斯聘用你?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5958d557c902baf3e8 | 官方: 否 | 付费: 否
答案:
The above question can be answered by you in this way- “This is a wonderful opportunity for me to get interviewed at such a renowned company. Infosys will definitely prove to be an exceptional platform for me to establish my skills and knowledge in the corporate world. Even though I’m a fresher, I can firmly assure you that I will give my best and work to my fullest potential, so that I can contribute efficiently towards the growth and success of this great brand.”
你可以这样回答上述问题:“对我来说,能在这家知名公司面试是一个绝佳的机会。印孚瑟斯无疑将是我在企业界展示技能和知识的优秀平台。尽管我是新手,但我可以坚定地向您保证,我会尽最大努力,发挥最大潜力,高效地为这个伟大品牌的成长和成功做出贡献。”
1052. Is Infosys Interview easy?
印孚瑟斯的面试容易吗?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5958d557c902baf3eb | 官方: 否 | 付费: 否
答案:
The difficulty level of Infosys interview is moderate. If you have good technical and communication skills, then you can easily crack all the rounds without any difficulties. If you prepare properly for the Infosys interview, you can answer any difficult questions from the interviewer.
印孚瑟斯面试的难度是中等。如果你有良好的技术和沟通技能,那么你可以轻松通过所有轮次,没有任何困难。如果你为印孚瑟斯面试做好充分准备,你可以回答面试官提出的任何难题。
1053. How should I prepare for Infosys technical interview?
我应该如何准备印孚瑟斯的技术面试?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5958d557c902baf3ee | 官方: 否 | 付费: 否
答案:
For the technical interview, Infosys expects you to have a stronghold in the following topics. If you prepare on these aspects with the best of your efforts, then surely you can crack the interview easily. - The majority of the questions will be asked on programming languages like C, C++, or Java. Here the questions can be asked directly from syntax, so you need to be sure that you are choosing the correct programming language. The questions can be asked from computer fundamentals like OOPs, Operating systems, etc. You will also be given to write a program, wherein mainly your syntax and the logic that has been used will be checked.
对于技术面试,印孚瑟斯期望你在以下主题上拥有扎实的基础。如果你在这些方面尽最大努力准备,那么肯定能轻松通过面试。- 大部分问题会涉及编程语言,如C、C++或Java。这里的问题可能直接来自语法,所以你需要确保选择正确的编程语言。问题可能来自计算机基础知识,如OOP、操作系统等。你还会被要求编写一个程序,主要检查你的语法和所使用逻辑。
- One more aspect is Data Structure and Algorithms, in which you need to have a basic understanding of Data Structure concepts like a stack, linked list, queue, etc. Here only basic concepts will be asked, so need not worry about some high-end aspects like Trees, Graphs, etc.
- It is expected that you need to have good command over the concepts on database concepts like SQL, MongoDB, etc. Here the questions can be asked from basic relational database concepts as well from SQL syntax.
1054. Does Infosys require a degree?
印孚瑟斯要求学位吗?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5958d557c902baf3f1 | 官方: 否 | 付费: 否
答案:
It is actually very common in India to have a basic Degree to get any kind of decent job. Especially in the IT sector, candidates are required to possess computer science or any of the relevant graduation degrees, so is the case with Infosys.
在印度,拥有基础学位才能获得任何体面的工作实际上非常普遍。尤其是在IT行业,候选人需要拥有计算机科学或任何相关的本科毕业学位,印孚瑟斯也是如此。
But, now the time has changed and plenty of developments are happening in the IT sector. In a recent announcement, Infosys has mentioned that it will also hire candidates who are not having a degree certificate. But, they should hold a relevant career certification specified by Infosys.
但是,现在时代变了,IT行业正在发生许多发展。在最近的一项公告中,印孚瑟斯提到,它也将招聘没有学位证书的候选人。但是,他们应持有印孚瑟斯指定的相关职业认证。
1055. what is the salary for freshers in Infosys?
印孚瑟斯新手的薪资是多少?
- 知识点: 其他/未分类 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5958d557c902baf3f4 | 官方: 否 | 付费: 否
答案:
Infosys usually offers competitive salaries for freshers. The salary for freshers at Infosys can range from Rs.2 Lakhs to Rs. 5 Lakhs per annum. Typically, the average fresher's salary in Infosys is Rs 3.2 Lakhs per annum as per the details furnished in Ambitionbox.
印孚瑟斯通常为新手提供具有竞争力的薪资。印孚瑟斯新手年薪范围在20万卢比到50万卢比之间。根据Ambitionbox提供的信息,印孚瑟斯的平均新手年薪通常为每年32万卢比。
1056. How much does a Software Engineer or a Senior Software Engineer make at LinkedIn?
在LinkedIn,软件工程师或高级软件工程师的薪资是多少?
- 知识点: 其他/未分类 (标签: interviewbit, linkedin, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: 领英
- id: 69b37b8858d557c902bb1ad4 | 官方: 否 | 付费: 否
答案:
The average salary that a fresher gets as a software engineer at Linkedin is 20 lakhs per annum and that of a senior software engineer is around 30 lakhs per annum. Overall the average salary for a software engineer profile at Linkedin ranges between ₹ 17.3 Lakhs to ₹ 50 Lakhs.
LinkedIn软件工程师新人的平均薪资为每年20万卢比,而高级软件工程师约为每年30万卢比。总体而言,LinkedIn软件工程师职位的平均薪资范围在₹17.3万至₹50万之间。
1057. Is LinkedIn Interview Hard?
LinkedIn面试难吗?
- 知识点: 其他/未分类 (标签: interviewbit, linkedin, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: 领英
- id: 69b37b8858d557c902bb1ad7 | 官方: 否 | 付费: 否
答案:
Overall the level of the questions asked in the Linkedin interview ranges from medium to hard. The interviewer expects you to have really good coding skills and a deep understanding of whatever you have mentioned in your resume. But with the right preparation, You can ace the Linkedin interview for a software engineer position easily. Nothing is hard, just approach things strategically.
总体而言,LinkedIn面试中问题的难度范围从中等到困难。面试官期望您具备出色的编码技能,并对简历中提到的内容有深入理解。但只要准备得当,您可以轻松通过LinkedIn软件工程师职位的面试。没有什么是困难的,只需战略性方法。
- Data Science
- All Events
- My Events
1058. What are the top 5 questions to ask when interviewing at Linkedin?
在LinkedIn面试时,向面试官提问的前5个问题是什么?
- 知识点: 其他/未分类 (标签: interviewbit, linkedin, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: 领英
- id: 69b37b8858d557c902bb1ada | 官方: 否 | 付费: 否
答案:
Dig deep into these questions. If you are asking the questions then this shows your interest in joining the company to the interviewer. You get to know about the culture and values of the company. Here are the top 5 questions that you can ask an interviewer
深入探讨这些问题。如果你在提问,这表明你向面试官展示了加入公司的兴趣。你能了解公司的文化和价值观。以下是你可以向面试官提出的5个顶级问题
What is your favorite part about working in this company and what is the most challenging aspect of this job? 2. Ask about the day-to-day responsibilities of the role for which you have been interviewed. 3. Can you tell me about the learning process that you follow in your life? 4. What are the metrics on which my performance will be evaluated while working in the company? 5. What are the key values and characteristics that you look for in an employee?
- 你最喜欢在这家公司工作的哪一点,这份工作最具挑战性的方面是什么? 2. 询问你面试职位的日常职责。 3. 你能告诉我你生活中遵循的学习过程吗? 4. 在公司工作时,我的表现将依据哪些指标进行评估? 5. 你寻找员工时应具备哪些关键价值观和特征?
1059. Is it ethical to check the Interviewer’s Linkedin profile before an Interview?
在面试前查看面试官的LinkedIn个人资料是否合乎道德?
- 知识点: 其他/未分类 (标签: interviewbit, linkedin, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: 领英
- id: 69b37b8858d557c902bb1add | 官方: 否 | 付费: 否
答案:
Yes, it is totally fine to go through your interviewer’s social media profile. By doing this you are preparing for the interview. You get to know about your interviewer’s role, background, and interests. But just go through their profile, don’t ping the interviewer before the interview.
是的,查看面试官的社交媒体个人资料完全没问题。这样做你是在为面试做准备。你能了解面试官的角色、背景和兴趣。但只需浏览他们的个人资料,不要在面试前给面试官发消息。
1060. How are the work-life balance and working hours at LinkedIn?
在LinkedIn,工作与生活的平衡和工作时间如何?
- 知识点: 其他/未分类 (标签: interviewbit, linkedin, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: 领英
- id: 69b37b8858d557c902bb1ae4 | 官方: 否 | 付费: 否
答案:
LinkedIn takes care of its employees very well. It has a quite good work-life balance. The pace of work at LinkedIn is comfortably fast with flexible working hours and employees generally work 8 hours or less a day. As long as you complete your work on time, no one will bother you. Working at LinkedIn can be challenging but not stressful. The company also promotes a culture of not working overtime.
LinkedIn非常关心其员工。它有相当好的工作与生活平衡。LinkedIn的工作节奏舒适且快,工作时间灵活,员工通常每天工作8小时或更少。只要你按时完成工作,没人会打扰你。在LinkedIn工作可能具有挑战性,但不会压力过大。公司还倡导不加班的文化。
1061. Does the Interviewer check my LinkedIn profile before the interview?
面试官会在面试前查看我的LinkedIn个人资料吗?
- 知识点: 其他/未分类 (标签: interviewbit, linkedin, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: 领英
- id: 69b37b8858d557c902bb1ae7 | 官方: 否 | 付费: 否
答案:
Not all interviewers check your LinkedIn profile but there is a high possibility they might go through your profile while being interviewed on Linkedin. So make sure that your profile matches your resume. Keep it updated and aligned.
并非所有面试官都会查看你的LinkedIn个人资料,但在LinkedIn面试时,他们很可能浏览你的个人资料。因此,确保你的个人资料与简历匹配。保持更新和一致。
1062. Is it necessary to ask the interviewer a question at the end of the interview?
面试结束时是否必须向面试官提问?
- 知识点: 其他/未分类 (标签: interviewbit, linkedin, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: 领英
- id: 69b37b8858d557c902bb1aea | 官方: 否 | 付费: 否
答案:
It is not necessary but would strongly suggest you ask one. Asking questions signals that you are motivated and serious about the job.
不是必须的,但强烈建议你提一个问题。提问能表明你对这份工作充满动力且认真对待。
Coding Problems
0/2
Easy Problems
简单问题
Arrays
数组
Binary Search
二分查找
Max Sum Contiguous Subarray
最大连续子数组和
Easy
简单
33.39 Mins
33.39分钟
Solve
解答
Implement Power Function
实现幂函数
Easy
简单
59.44 Mins
59.44分钟
Solve
解答
0/4
Intermediate Problems
中级问题
Dynamic Programming
动态规划
Max Product Subarray
最大乘积子数组
Medium
中等
65.25 Mins
65.25 分钟
Solve
解答
Edit Distance
编辑距离
Medium
中等
47.1 Mins
47.1 分钟
Solve
解答
Longest Palindromic Subsequence
最长回文子序列
Medium
中等
41.13 Mins
41.13 分钟
Solve
解答
Paint House!
粉刷房屋!
Medium
中等
42.8 Mins
42.8 分钟
Solve
解答
0/1
Advanced Problems
进阶问题
Strings
字符串
Justified Text
两端对齐文本
Hard
困难
79.35 Mins
79.35分钟
Solve
解答
1063. Roles offered by Tiger Analytics
Tiger Analytics提供的职位
- 知识点: 其他/未分类 (标签: interviewbit, tiger-analytics, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Tiger Analytics
- id: 69b37c7c58d557c902bc8d85 | 官方: 否 | 付费: 否
答案:
Let's explore the different roles offered by Tiger Analytics before discussing their interview questions for freshers.
在讨论Tiger Analytics的应届生面试问题之前,让我们先探索他们提供的不同职位。
Tiger Analytics offers a variety of roles to professionals, including Data Analysts, Data Engineers, Database Administrators, Machine Learning Engineers, Data Scientists, and Data Architects. - Data Analysts are responsible for processing and visualizing data, running queries against databases, and developing and modifying algorithms to extract data from extensive datasets without compromising its quality.
Tiger Analytics为专业人士提供多种职位,包括数据分析师、数据工程师、数据库管理员、机器学习工程师、数据科学家和数据架构师。- 数据分析师负责处理和可视化数据、针对数据库运行查询,以及开发和修改算法以从大规模数据集中提取数据,同时不影响数据质量。
- Data Engineers develop and test scalable Big Data ecosystems for enterprises to enable data scientists to execute their algorithms on secure and highly optimized data platforms. They also upgrade or replace older versions of existing systems to increase database effectiveness.
- Database Administrators ensure that all databases within an organization are functioning correctly and grant or revoke employee access to databases according to their needs. They also perform database backups and recoveries.
- Machine Learning Engineers, in addition to having in-depth knowledge of powerful technologies such as SQL and REST APIs, perform A/B testing, build data pipelines, and implement standard machine learning algorithms like classification and clustering
- Data Scientists analyze data to provide solutions to business challenges, conduct predictive research, comb through unstructured data, and spot trends and patterns to help businesses make better decisions.
- Finally, Data Architects develop blueprints for data management, allowing for simple database integration, centralization, and best-practice security protection. They also ensure that the data engineers have the best equipment and setups to work with.
1064. Is the Zoho interview difficult?
Zoho面试难吗?
- 知识点: 其他/未分类 (标签: interviewbit, zoho, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Zoho
- id: 69b37c9f58d557c902bc9efe | 官方: 否 | 付费: 否
答案:
No, the Zoho interview is not difficult. All you need to come out of the interview with flying colors is a good understanding of the basic programming concepts, logical thinking, and problem-solving skills.
不,Zoho面试并不难。你只需要对基础编程概念有良好理解、具备逻辑思维和解决问题的能力,就能在面试中脱颖而出。
1065. What questions to expect in the screening round?
筛选轮会有什么类型的问题?
- 知识点: 其他/未分类 (标签: interviewbit, zoho, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Zoho
- id: 69b37c9f58d557c902bc9f01 | 官方: 否 | 付费: 否
答案:
This round contains around 20 to 30 questions from both general aptitude and programming aptitude. Usually, the general aptitude questions cover around 30% to 50%, with the remaining questions from C programming. Check out the above section to learn more .
这一轮包含大约20到30道题,涵盖一般能力和编程能力。通常,一般能力题约占30%到50%,其余问题来自C编程。请查看上面的部分了解更多信息。
- Data Science
- All Events
- My Events
1066. How to prepare for a Zoho Interview?
如何准备Zoho面试?
- 知识点: 其他/未分类 (标签: interviewbit, zoho, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Zoho
- id: 69b37c9f58d557c902bc9f04 | 官方: 否 | 付费: 否
答案:
To ace an interview at Zoho, You don’t need to know about all the algorithms out there. All you need is a good understanding of basic concepts, such as loops, recursions, and pointers, etc., and good problem-solving skills. You need to be able to find a logical solution for the basic questions. Check out the above section to learn more .
要在Zoho面试中表现出色,你不需要了解所有的算法。你只需要对基本概念(如循环、递归和指针等)有良好理解,以及具备良好的问题解决能力。你需要能够为基础问题找到逻辑解决方案。请查看上面的部分了解更多信息。
1067. What is the eligibility criteria for Zoho?
Zoho的资格标准是什么?
- 知识点: 其他/未分类 (标签: interviewbit, zoho, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Zoho
- id: 69b37c9f58d557c902bc9f07 | 官方: 否 | 付费: 否
答案:
The eligibility criteria for Zoho is that you should have completed or are currently enrolled in a BE / B.Tech program in computer science and related fields. Students from any stream/Department, even with backlogs, can apply.
Zoho的资格标准是你必须已完成或目前正在攻读计算机科学及相关领域的BE / B.Tech课程。任何学科/系的学生,即使有挂科记录,也可以申请。
1068. How do I apply for a job in Zoho?
如何申请卓豪(Zoho)的工作?
- 知识点: 其他/未分类 (标签: interviewbit, zoho, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Zoho
- id: 69b37c9f58d557c902bc9f0e | 官方: 否 | 付费: 否
答案:
You can apply for a job in Zoho through their official website, Zoho Corp Careers ( zohorecruit.com ), or LinkedIn. If you know someone who works in the company, then referrals are the best option.
你可以通过卓豪的官方网站 Zoho Corp Careers(zohorecruit.com)或领英(LinkedIn)申请工作。如果你认识在公司内部工作的人,那么内推是最佳选择。
1069. Why do you want to join Zoho?
你为什么想加入卓豪?
- 知识点: 其他/未分类 (标签: interviewbit, zoho, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Zoho
- id: 69b37c9f58d557c902bc9f11 | 官方: 否 | 付费: 否
答案:
Three out of every five Fortune 500 companies trust Zoho, So you can be sure that the company will continue to grow. The work culture in Zoho is amazing, and they are constantly improving by getting reviews from the employees. The work-life balance is amazing, thanks to the flexible working hours policy. It also provides a great opportunity to learn new things every day.
财富500强企业中,五分之三的企业信任卓豪,因此你可以确信公司会持续发展。卓豪的工作文化非常出色,他们通过收集员工反馈不断改进。得益于灵活的工作时间政策,工作与生活的平衡也非常好。它还提供了每天学习新事物的绝佳机会。
1070. What are the perks of being a Zoho employee?
成为卓豪员工有哪些福利?
- 知识点: 其他/未分类 (标签: interviewbit, zoho, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Zoho
- id: 69b37c9f58d557c902bc9f14 | 官方: 否 | 付费: 否
答案:
- Good starting package
- Good compensation
- Freed food round the clock
- Free gadgets, iPhone and MacBook
- Free commute options
- Yearly benefits
- Decent hikes
- Great work culture
- Good peers
1071. Does Zoho have dress code?
卓豪有着装要求吗?
- 知识点: 其他/未分类 (标签: interviewbit, zoho, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Zoho
- id: 69b37c9f58d557c902bc9f17 | 官方: 否 | 付费: 否
答案:
There is no strict dress code in Zoho, so you can wear what you like to wear.
卓豪没有严格的着装要求,所以你可以穿自己喜欢的衣服。
1072. What is the working hours at Zoho?
卓豪的工作时间是如何安排的?
- 知识点: 其他/未分类 (标签: interviewbit, zoho, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Zoho
- id: 69b37c9f58d557c902bc9f1b | 官方: 否 | 付费: 否
答案:
Zoho Corporations provides flexible working hours. Flexible working hours mean the employee can decide the start and finish of his workday. It is advised to maintain consistent working hours, but not mandatory.
卓豪公司提供灵活的工作时间。灵活的工作时间意味着员工可以自行决定工作日的开始和结束时间。建议保持稳定的工作时间,但这不是强制性的。
Successful Tech Career for FREE!
免费开启成功的科技职业生涯!
Successful Tech Career!
成功的技术职业生涯!
Interview Process
面试流程
CTC & Designation
CTC与职位级别
Projects on the Job
工作项目
Referral System
推荐系统
Try It Out
试试看
2 Lakh+ Roadmaps Created
已生成20万+职业规划
1073. What is the cool-off period for Zoho?
Zoho的冷却期是多久?
- 知识点: 其他/未分类 (标签: interviewbit, zoho, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Zoho
- id: 69b37c9f58d557c902bc9f21 | 官方: 否 | 付费: 否
答案:
In recruitment policy terms, the “cool-off period” represents the duration that a candidate is barred from re-applying at a company where she/he was rejected during the interview process. Like most of the Product based companies, the cool-off period for Zoho is 6 months.
在招聘政策术语中,“冷却期”指的是候选人在面试过程中被拒绝后,不得再次向该公司申请职位的时长。与大多数产品型公司一样,Zoho的冷却期为6个月。
1074. What are the different kinds of copies in the context of Commvault and what do they mean?
在 Commvault 中,只允许一个主副本和多种辅助/次级副本。副本类型有多种。- 选择性复制:您可以从源副本(可以是主副本或同步副本)复制指定的完整备份作业。选择性复制有助于更高效地进行磁带轮换。
- 知识点: 其他/未分类 (标签: interviewbit, commvault, company-specific)
- 类型: technical | 难度: hard | 子类型: concept
- 分类: general
- 公司: Commvault
- id: 69b37a4d58d557c902ba50f5 | 官方: 否 | 付费: 否
答案:
In Commvault, only one primary copy and many sorts of auxiliary/secondary copies are permitted. There are various types of copies. - Selective Copy: You can copy specified full backup jobs from a source copy, which can be either a primary or a synchronous copy. Selective copy allows for more efficient tape rotation.
我如何进入 Commvault 工作?
- Inline copy: During the Backup Phase, both the Primary and Secondary copies are written to storage. Backups will fail if the secondary storage does not have adequate space.
Synchronous copy: A synchronous copy copies all of the data from the primary.
Useful Interview Preparation Resources - CommVault Documentation这是一个行为问题。在这里,面试官评估您的兴趣和加入公司的意愿。您的回答必须清晰展示是什么激励您在 Commvault 工作。
- VMware Interview Questions
- Technical Interview Questions
- Coding Interview Questions
1075. What is the difference between a snapshot and a clone of a virtual machine?
虚拟机的快照和克隆有什么区别?
- 知识点: 其他/未分类 (标签: interviewbit, commvault, company-specific)
- 类型: technical | 难度: hard | 子类型: concept
- 分类: general
- 公司: Commvault
- id: 69b37a4d58d557c902ba5104 | 官方: 否 | 付费: 否
答案:
A snapshot copies the virtual machine's disk file to maintain its current state. It is used as a backup system. Create a snapshot if you need to save the configuration of a virtual machine so you can revert to it later if something goes wrong. A clone, on the other hand, is a complete copy of the virtual machine. Cloning is the sole option if you need to create a new virtual machine that will run on its own.
快照会复制虚拟机的磁盘文件以保持其当前状态,用作备份系统。若需保存虚拟机配置以便日后出现问题时回退,则创建快照。另一方面,克隆是虚拟机的完整副本。若需创建可独立运行的新虚拟机,克隆是唯一选择。
1076. Explain the following terminologies in the context of Commvault: Storage Policy, Job Manager, Backup set, Subclient, Collect Files.
在 Commvault 环境中解释以下术语:存储策略、作业管理器、备份集、子客户端、收集文件。
- 知识点: 其他/未分类 (标签: interviewbit, commvault, company-specific)
- 类型: technical | 难度: hard | 子类型: concept
- 分类: general
- 公司: Commvault
- id: 69b37a4d58d557c902ba5108 | 官方: 否 | 付费: 否
答案:
- Storage Policy: The storage policy determines where the data is saved and how long the snapshot will be kept. Copies can be found within a Storage Policy. In the IRM environment, these copies define retention for the designated storage devices. Within IRM, there are just two versions of interest. The Primary Snapshot Copy and the Primary Copy are two different copies of the same thing. The Primary Snapshot Copy merely specifies how long the snapshots will be kept and which MediaAgent will be cataloguing them. The Primary Copy specifies the location of the catalogued indexes.
- Job Manager: Displays all information about a running job, including data protection, recovery, and Auxiliary copy, as well as settings and media usage. Snapshot jobs can be launched, suspended, restarted, and cancelled by the Job Manager.
- Backup Set: A backup set is a sub-container present within each of these agents. The backup set is the client's overall container. The most straightforward approach to comprehending a backup set is to relate it to the context of the system being snapped in the environment. The backup set for the file system iDataAgent is the fundamental physical system storage environment, whereas the backup set for these two database agents is the Exchange Information Store or SQL instance. An overall vCenter is the backup set in a Virtual Context since it encompasses numerous ESX servers that house and manage virtual machines.
- Subclient: The smallest subset of a client is called a subclient. From the perspective of a Windows host, it may be a single folder, a single database, a single Virtual machine, or a single LUN or drive letter (regardless of how many LUNs are meta-LUN'ed to produce one huge LUN pool). Sub clients are backup set definitions that are related to Storage Policies, which define the snapshot data's retention and location.
- Collect Files: During an IntelliSnap job, Collect Files are smaller text files that will gather information on what is on each of the clone/snapshots. The original information lying on the snapshots is indexed by the collect files saved under the task result directory under each of the IRM clients when the snapshot is mounted to be catalogued. Once the cataloguing is complete, the information will be given immediately to the MediaAgent who will store it in indexes for a longer period of time. These indexes will remain on the MediaAgent for the duration of the snapshot's retention period, either in the local MediaAgent index cache or in the disc library set up to protect the indexes and the CommCell database backup.
评论