"It might not be a good idea to predict stock prices only based on reddit comments.
You could create a signal from reddit comments that can indicate "social media interest" and feed it into a ML system (along with other features) that predicts prices. Collecting good data to train the model and evaluating it correctly are going to be huge challenges."
Satyajit G. - "It might not be a good idea to predict stock prices only based on reddit comments.
You could create a signal from reddit comments that can indicate "social media interest" and feed it into a ML system (along with other features) that predicts prices. Collecting good data to train the model and evaluating it correctly are going to be huge challenges."See full answer
"#include
// Naive method to find a pair in an array with a given sum
void findPair(int nums[], int n, int target)
{
// consider each element except the last
for (int i = 0; i < n - 1; i++)
{
// start from the i'th element until the last element
for (int j = i + 1; j < n; j++)
{
// if the desired sum is found, print it
if (nums[i] + nums[j] == target)
{
printf("Pair found (%d, %d)\n", nums[i], nums[j]);
return;
}
}
}
// we reach here if the pair is not found
printf("Pair not found");
}
"
Gundala tarun,cse2020 V. - "#include
// Naive method to find a pair in an array with a given sum
void findPair(int nums[], int n, int target)
{
// consider each element except the last
for (int i = 0; i < n - 1; i++)
{
// start from the i'th element until the last element
for (int j = i + 1; j < n; j++)
{
// if the desired sum is found, print it
if (nums[i] + nums[j] == target)
{
printf("Pair found (%d, %d)\n", nums[i], nums[j]);
return;
}
}
}
// we reach here if the pair is not found
printf("Pair not found");
}
"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
"Functional requirement's:
partial search while searching for users, products any keywords in the search.
additional keywords in the filter
Black listed words in the search.
Non functional requirements:
low latency,
search through 2 Billion records
recent search should be cached.
Design:
high reads,
we should have caching enabled over the primary db storages.
caching cluster can be added when the search load increases.
read ahead. - check in cache
(periodic cache refresh), lfu, lru
"
Sandeep Y. - "Functional requirement's:
partial search while searching for users, products any keywords in the search.
additional keywords in the filter
Black listed words in the search.
Non functional requirements:
low latency,
search through 2 Billion records
recent search should be cached.
Design:
high reads,
we should have caching enabled over the primary db storages.
caching cluster can be added when the search load increases.
read ahead. - check in cache
(periodic cache refresh), lfu, lru
"See full answer
"Reinforcement Learning is a type of machine learning where an agent learns to make decisions by trying out different actions and receiving rewards or penalties in return. The goal is to learn, over time, which actions yield the highest rewards.
There are three core components in RL:
The agent — the learner or decision-maker (e.g., an algorithm or robot),
The environment — everything the agent interacts with,
Actions and rewards — the agent takes actions, and the environmen"
Constantin P. - "Reinforcement Learning is a type of machine learning where an agent learns to make decisions by trying out different actions and receiving rewards or penalties in return. The goal is to learn, over time, which actions yield the highest rewards.
There are three core components in RL:
The agent — the learner or decision-maker (e.g., an algorithm or robot),
The environment — everything the agent interacts with,
Actions and rewards — the agent takes actions, and the environmen"See full answer
"Yes, I need to compare the first half of the first string with the reverse order of the second half of the second string. Repeat this process to the first half of the second string and the second half of the first string."
Anonymous Condor - "Yes, I need to compare the first half of the first string with the reverse order of the second half of the second string. Repeat this process to the first half of the second string and the second half of the first string."See full answer
"Use an index, two pointers, and a set to keep track of elements that you've seen.
pseudo code follows:
for i, elem in enumerate(array):
if elem in set return False
if i > N:
set.remove(array[i-N])"
Michael B. - "Use an index, two pointers, and a set to keep track of elements that you've seen.
pseudo code follows:
for i, elem in enumerate(array):
if elem in set return False
if i > N:
set.remove(array[i-N])"See full answer
"Problem: Given a modified binary tree, where each node also has a pointer to it's parent, find the first common ancestor of two nodes.
Answer: As it happens, the structure that we're looking at is actually a linked list (one pointer up), so the problem is identical to trying to find if two linked lists share a common node.
How this works is by stacking the two chains of nodes together so they're the same length.
chain1 = node1
chain2= node2
while True:
chain1 = chain1.next
chain2=chain"
Michael B. - "Problem: Given a modified binary tree, where each node also has a pointer to it's parent, find the first common ancestor of two nodes.
Answer: As it happens, the structure that we're looking at is actually a linked list (one pointer up), so the problem is identical to trying to find if two linked lists share a common node.
How this works is by stacking the two chains of nodes together so they're the same length.
chain1 = node1
chain2= node2
while True:
chain1 = chain1.next
chain2=chain"See full answer