"Identify the problems and list down, showcase the benefits and what stakeholders will get out of analytics platform, how proposed tool can support the org strategy goals and can achieve more faster, how the analytics tool will solve the existing problems"
Ameet A. - "Identify the problems and list down, showcase the benefits and what stakeholders will get out of analytics platform, how proposed tool can support the org strategy goals and can achieve more faster, how the analytics tool will solve the existing problems"See full answer
"I will work with data scientist to implement anomaly detection models to flag any deviations in a business’s review patterns over time. Like if any sudden influx of positive reviews after a negative review could indicate a reputation management effort. Or Any like any bot reviews happening in quick sessions happening from different cities/geo locations"
Anonymous Duck - "I will work with data scientist to implement anomaly detection models to flag any deviations in a business’s review patterns over time. Like if any sudden influx of positive reviews after a negative review could indicate a reputation management effort. Or Any like any bot reviews happening in quick sessions happening from different cities/geo locations"See full answer
"Basic Approach
As BST inorder traversal will result in a sequence of increasing order. Store that order in a vector and get the k-1 index to get the Kth smallest element, similarly access the N-K+1 th element will be the Kth largest element
Time Complexity: O(n)
Space Complexity O(n)
Space Optimized Approach
For Kth smallest , start inorder traversal, and keep a counter, decrement the counter when you access the node element. When the counter turns 0 that elementwill be the Kth smal"
Saurabh S. - "Basic Approach
As BST inorder traversal will result in a sequence of increasing order. Store that order in a vector and get the k-1 index to get the Kth smallest element, similarly access the N-K+1 th element will be the Kth largest element
Time Complexity: O(n)
Space Complexity O(n)
Space Optimized Approach
For Kth smallest , start inorder traversal, and keep a counter, decrement the counter when you access the node element. When the counter turns 0 that elementwill be the Kth smal"See full answer
"function isPalindrome(s, start, end) {
while (s[start] === s[end] && end >= start) {
start++;
end--;
}
return end <= start;
}
function longestPalindromicSubstring(s) {
let longestPalindrome = '';
for (let i=0; i < s.length; i++) {
let j = s.length-1;
while (s[i] !== s[j] && i <= j) {
j--;
}
if (s[i] === s[j]) {
if (isPalindrome(s, i, j)) {
const validPalindrome = s.substring(i, j+1"
Tiago R. - "function isPalindrome(s, start, end) {
while (s[start] === s[end] && end >= start) {
start++;
end--;
}
return end <= start;
}
function longestPalindromicSubstring(s) {
let longestPalindrome = '';
for (let i=0; i < s.length; i++) {
let j = s.length-1;
while (s[i] !== s[j] && i <= j) {
j--;
}
if (s[i] === s[j]) {
if (isPalindrome(s, i, j)) {
const validPalindrome = s.substring(i, j+1"See full answer
" First, sort the array in ascending order. This ensures that we can easily check the triangle inequality condition. Use a loop to iterate through the array. For each triplet of consecutive elements, check if they satisfy the triangle inequality condition a+b>ca+b>c. As soon as you find a valid tuple, return it. If no valid tuple is found, return null. This approach is efficient with a time complexity of O(nlogn)O(nlogn) due to the sorting step, followed by a linear scan of the array"
Shivam P. - " First, sort the array in ascending order. This ensures that we can easily check the triangle inequality condition. Use a loop to iterate through the array. For each triplet of consecutive elements, check if they satisfy the triangle inequality condition a+b>ca+b>c. As soon as you find a valid tuple, return it. If no valid tuple is found, return null. This approach is efficient with a time complexity of O(nlogn)O(nlogn) due to the sorting step, followed by a linear scan of the array"See full answer
"Make current as root.
2 while current is not null,
if p and q are less than current,
go left.
If p and q are greater than current,
go right.
else return current.
return null"
Vaibhav D. - "Make current as root.
2 while current is not null,
if p and q are less than current,
go left.
If p and q are greater than current,
go right.
else return current.
return null"See full answer