"Let me tell you about a time where a website I managed suddenly showed slow performance and the mistake on our side was it was unnoticed until a user reported the issue to management. As a PM for that project, I took full responsibility of the situation and worked with the engineering team to quickly resolve it. This mistake taught me the importance of focusing and monitoring non functional requirements as well in addition to new feature development /adoption where I was mostly spending my time"
Sreenisha S. - "Let me tell you about a time where a website I managed suddenly showed slow performance and the mistake on our side was it was unnoticed until a user reported the issue to management. As a PM for that project, I took full responsibility of the situation and worked with the engineering team to quickly resolve it. This mistake taught me the importance of focusing and monitoring non functional requirements as well in addition to new feature development /adoption where I was mostly spending my time"See full answer
"Reversing a linked list is a very popular question. We have two approaches to reverse the linked list: Iterative approach and recursion approach.
Iterative approach (JavaScript)
function reverseLL(head){
if(head === null) return head;
let prv = null;
let next = null;
let cur = head;
while(cur){
next = cur.next; //backup
cur.next = prv;
prv = cur;
cur = next;
}
head = prv;
return head;
}
Recursion Approach (JS)
function reverseLLByRecursion("
Satyam S. - "Reversing a linked list is a very popular question. We have two approaches to reverse the linked list: Iterative approach and recursion approach.
Iterative approach (JavaScript)
function reverseLL(head){
if(head === null) return head;
let prv = null;
let next = null;
let cur = head;
while(cur){
next = cur.next; //backup
cur.next = prv;
prv = cur;
cur = next;
}
head = prv;
return head;
}
Recursion Approach (JS)
function reverseLLByRecursion("See full answer
"As you know, this is the most important question for any interview. Here is a structure I like to follow,
Start with 'I'm currently a SDE/PM/TPM etc with XYZ company.... '
Mention how you got into PM/TPM/SDE field (explaining your journey)
Mention 1 or 2 accomplishments
Mention what you do outside work (blogging, volunteer etc)
Share why are you looking for a new role
Ask the interviewer if they have any questions or will like to dive deep into any of your experience"
Bipin R. - "As you know, this is the most important question for any interview. Here is a structure I like to follow,
Start with 'I'm currently a SDE/PM/TPM etc with XYZ company.... '
Mention how you got into PM/TPM/SDE field (explaining your journey)
Mention 1 or 2 accomplishments
Mention what you do outside work (blogging, volunteer etc)
Share why are you looking for a new role
Ask the interviewer if they have any questions or will like to dive deep into any of your experience"See full answer
"For any project based questions, it is important to structure your response clearly, showcasing your thought process, technical skills, problem-solving abilities, and how your work added value. Besides the STAR method, you can also use this kind of framework:
1. Start by selecting a relevant project (related to the role)
Give the project background and what specific problem it solved.
2. Align the project's objective and your role
Be specific about your role: were you the le"
Malay K. - "For any project based questions, it is important to structure your response clearly, showcasing your thought process, technical skills, problem-solving abilities, and how your work added value. Besides the STAR method, you can also use this kind of framework:
1. Start by selecting a relevant project (related to the role)
Give the project background and what specific problem it solved.
2. Align the project's objective and your role
Be specific about your role: were you the le"See full answer
"SELECT
s.Sale_Date,
SUM(si.Quantity * si.SalePrice) AS TotalRevenue
FROM Sales s
JOIN SaleItems si ON s.SaleID = si.Sale_ID
GROUP BY s.Sale_Date
ORDER BY s.Sale_Date;
"
Bala G. - "SELECT
s.Sale_Date,
SUM(si.Quantity * si.SalePrice) AS TotalRevenue
FROM Sales s
JOIN SaleItems si ON s.SaleID = si.Sale_ID
GROUP BY s.Sale_Date
ORDER BY s.Sale_Date;
"See full answer
Data Engineer
Coding
+2 more
🧠Want an expert answer to a question? Saving questions lets us know what content to make next.
"
A couple of years ago, we were working on a project to integrate a new third-party data feed into our existing data processing pipeline. This data feed was critical for enhancing our trading algorithms with more comprehensive market data. Given the tight timeline and high stakes, I decided to push for a rapid implementation.
In my eagerness to meet the deadline, I underestimated the complexity of integrating this new data feed. I did not allocate sufficient time for thorough testing and valida"
Scott S. - "
A couple of years ago, we were working on a project to integrate a new third-party data feed into our existing data processing pipeline. This data feed was critical for enhancing our trading algorithms with more comprehensive market data. Given the tight timeline and high stakes, I decided to push for a rapid implementation.
In my eagerness to meet the deadline, I underestimated the complexity of integrating this new data feed. I did not allocate sufficient time for thorough testing and valida"See full answer
"this solution here is much faster than the exponent reference soln. It is also far more concise and easy to understand
def moveZerosToEnd(arr: List[int]) -> List[int]:
left = 0
for right in range(len(arr)):
if arr[right] == 0:
pass
else:
if left != right:
temp = arr[left]
arr[left] = arr[right]
arr[right] = temp
left += 1
return arr
`"
Devesh K. - "this solution here is much faster than the exponent reference soln. It is also far more concise and easy to understand
def moveZerosToEnd(arr: List[int]) -> List[int]:
left = 0
for right in range(len(arr)):
if arr[right] == 0:
pass
else:
if left != right:
temp = arr[left]
arr[left] = arr[right]
arr[right] = temp
left += 1
return arr
`"See full answer
"const ops = {
'+': (a, b) => a+b,
'-': (a, b) => a-b,
'/': (a, b) => a/b,
'': (a, b) => ab,
};
function calc(expr) {
// Search for + or -
for (let i=expr.length-1; i >= 0; i--) {
const char = expr.charAt(i);
if (['+', '-'].includes(char)) {
return opschar), calc(expr.slice(i+1)));
}
}
// Search for / or *
for (let i=expr.length-1; i >= 0; i--) {
const char = expr.charAt(i);
if"
Tiago R. - "const ops = {
'+': (a, b) => a+b,
'-': (a, b) => a-b,
'/': (a, b) => a/b,
'': (a, b) => ab,
};
function calc(expr) {
// Search for + or -
for (let i=expr.length-1; i >= 0; i--) {
const char = expr.charAt(i);
if (['+', '-'].includes(char)) {
return opschar), calc(expr.slice(i+1)));
}
}
// Search for / or *
for (let i=expr.length-1; i >= 0; i--) {
const char = expr.charAt(i);
if"See full answer
"
Brute Force Two Pointer Solution:
from typing import List
def two_sum(nums, target):
for i in range(len(nums)):
for j in range(i+1, len(nums)):
if nums[i]+nums[j]==target:
return [i,j]
return []
debug your code below
print(two_sum([2, 7, 11, 15], 9))
`"
Ritaban M. - "
Brute Force Two Pointer Solution:
from typing import List
def two_sum(nums, target):
for i in range(len(nums)):
for j in range(i+1, len(nums)):
if nums[i]+nums[j]==target:
return [i,j]
return []
debug your code below
print(two_sum([2, 7, 11, 15], 9))
`"See full answer
"A much better solution than the one in the article, below:
It looks like the ones writing articles here in Javascript do not understand the time/space complexity of javascript methods.
shift, splice, sort, etc... In the solution article you have a shift and a sort being done inside a while, that is, the multiplication of Ns.
My solution, below, iterates through the list once and then sorts it, separately. It´s O(N+Log(N))
class ListNode {
constructor(val = 0, next = null) {
th"
Guilherme F. - "A much better solution than the one in the article, below:
It looks like the ones writing articles here in Javascript do not understand the time/space complexity of javascript methods.
shift, splice, sort, etc... In the solution article you have a shift and a sort being done inside a while, that is, the multiplication of Ns.
My solution, below, iterates through the list once and then sorts it, separately. It´s O(N+Log(N))
class ListNode {
constructor(val = 0, next = null) {
th"See full answer
"bool isValidBST(TreeNode* root, long min = LONGMIN, long max = LONGMAX){
if (root == NULL)
return true;
if (root->val val >= max)
return false;
return isValidBST(root->left, min, root->val) &&
isValidBST(root->right, root->val, max);
}
`"
Alvaro R. - "bool isValidBST(TreeNode* root, long min = LONGMIN, long max = LONGMAX){
if (root == NULL)
return true;
if (root->val val >= max)
return false;
return isValidBST(root->left, min, root->val) &&
isValidBST(root->right, root->val, max);
}
`"See full answer
"This could be done using two-pointer approach assuming array is sorted: left and right pointers. We need track two sums (left and right) as we move pointers. For moving pointers we will move left to right by 1 (increment) when right sum is greater. We will move right pointer to left by 1 (decrement) when left sum is greater. at some point we will either get the sum same and that's when we exit from the loop. 0-left will be one array and right-(n-1) will be another array.
We are not going to mo"
Bhaskar B. - "This could be done using two-pointer approach assuming array is sorted: left and right pointers. We need track two sums (left and right) as we move pointers. For moving pointers we will move left to right by 1 (increment) when right sum is greater. We will move right pointer to left by 1 (decrement) when left sum is greater. at some point we will either get the sum same and that's when we exit from the loop. 0-left will be one array and right-(n-1) will be another array.
We are not going to mo"See full answer
"int main()
{
int a1[7]={1,2,3,4,5,6,7};
int a2[7]={1,9,10,11,12,13,14};
vectorv;
v.insert(v.begin(),begin(a1),end(a1));
v.insert(v.begin(),begin(a2),end(a2));
int a3[v.size()];
sort(v.begin(),v.end());
for(int i=0;i<v.size();i++)
{
a3[i]=v[i];
}
}
`"
Aryan D. - "int main()
{
int a1[7]={1,2,3,4,5,6,7};
int a2[7]={1,9,10,11,12,13,14};
vectorv;
v.insert(v.begin(),begin(a1),end(a1));
v.insert(v.begin(),begin(a2),end(a2));
int a3[v.size()];
sort(v.begin(),v.end());
for(int i=0;i<v.size();i++)
{
a3[i]=v[i];
}
}
`"See full answer
"from typing import List
def traprainwater(height: List[int]) -> int:
if not height:
return 0
l, r = 0, len(height) - 1
leftMax, rightMax = height[l], height[r]
res = 0
while l < r:
if leftMax < rightMax:
l += 1
leftMax = max(leftMax, height[l])
res += leftMax - height[l]
else:
r -= 1
rightMax = max(rightMax, height[r])
"
Anonymous Roadrunner - "from typing import List
def traprainwater(height: List[int]) -> int:
if not height:
return 0
l, r = 0, len(height) - 1
leftMax, rightMax = height[l], height[r]
res = 0
while l < r:
if leftMax < rightMax:
l += 1
leftMax = max(leftMax, height[l])
res += leftMax - height[l]
else:
r -= 1
rightMax = max(rightMax, height[r])
"See full answer