Novanectar's CodeBash

CodeBash

About the Codebash

Novanectar Code Bash is a high-energy, technical event designed for coders, developers, and tech enthusiasts to showcase their problem-solving skills and compete for incredible rewards and career opportunities.

Event Details

  • Challenge: Solve 50 multiple-choice questions in just 30 minutes.
  • Where: Online Hosted by Novanectar Services Pvt. Ltd.

Rewards

🏆 Prizes for Top Performers:
1️⃣ 1st Prize: ₹5000
2️⃣ 2nd Prize: ₹3000
3️⃣ 3rd Prize: ₹1000

🎯 Career Opportunities:

  • Top 3 Participants: 100% Job Placement Guarantee.
  • Top 10 Participants: Internship + Job Opportunity via Single-Round Interview.
  • Top 100 Participants: Internship Offers.
  • All Participants: Certificates of Participation.

Why Participate?

  • Test your technical knowledge in a fast-paced environment.
  • Gain valuable exposure and stand out to recruiters.
  • Win exciting prizes and secure your career path in tech.

Enter Your Details

1 / 50

How do you implement a REST API in Node.js with Express?

const express = require("express");
const app = express();
const port = 3000;

app.get("/api/data", (req, res) => {
res.json({ message: "Hello, World!" });
});

app.listen(port, () => {
console.log(`Server running on http://localhost:${port}`);
});

2 / 50

What is a lambda function in Python?

square = lambda x: x * x
print(square(5))

3 / 50

Which is the correct operation to fix violations in the Red-Black Tree after node deletion?

4 / 50

In Python, what output can you expect with time.time()

5 / 50

____ is considered a type of artificial intelligence agent.

6 / 50

How does React's Context API work, and how can it be used to manage global state?

import React, { createContext, useContext, useState } from "react";

const MyContext = createContext();

function ProviderComponent({ children }) {
const [state, setState] = useState("Hello, World!");

return (
<MyContext.Provider value={{ state, setState }}>
{children}
</MyContext.Provider>
);
}

function ChildComponent() {
const { state } = useContext(MyContext);
return <p>{state}</p>;
}

7 / 50

Linear regression models are preferable for

8 / 50

How can you optimize a SQL query for large datasets?

9 / 50

What is the purpose of the useEffect hook in React?

import React, { useState, useEffect } from "react";

function Timer() {
const [count, setCount] = useState(0);

useEffect(() => {
const interval = setInterval(() => {
setCount((prevCount) => prevCount + 1);
}, 1000);

return () => clearInterval(interval);
}, []);

return <p>Count: {count}</p>;
}

10 / 50

____ is the informed search method.

11 / 50

____ was originally called ‘the Imitation game’.

12 / 50

Under which rule does Procedural Domain Knowledge fit when considering a rule-based system?

13 / 50

How do you implement an API request in Python using requests?

import requests

response = requests.get("https://jsonplaceholder.typicode.com/posts/1")
if response.status_code == 200:
print(response.json())

14 / 50

From the following, choose the evaluation metric commonly used for classification tasks in the presence of class imbalance.

15 / 50

How do you implement a basic machine learning model using Python and scikit-learn?

from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from sklearn.datasets import load_iris

# Load dataset
data = load_iris()
X_train, X_test, y_train, y_test = train_test_split(data.data, data.target, test_size=0.2, random_state=42)

# Train model
model = LogisticRegression()
model.fit(X_train, y_train)

# Evaluate
accuracy = model.score(X_test, y_test)
print(f"Model Accuracy: {accuracy:.2f}")

16 / 50

Decisions of Victory/Defeat are made in Game trees using which algorithm?

17 / 50

Which of these is not the Meta Character of Regex in data analytics?

18 / 50

What is the purpose of data munging?

19 / 50

What is the output of the following Pandas operation?

import pandas as pd

df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})
df['C'] = df['A'] + df['B']
print(df)

20 / 50

How do you establish a connection to MongoDB using Mongoose?

const mongoose = require("mongoose");

mongoose.connect("mongodb://localhost:27017/myDatabase", {
useNewUrlParser: true,
useUnifiedTopology: true,
})
.then(() => console.log("Connected to MongoDB"))
.catch((err) => console.error("Error connecting to MongoDB", err));

21 / 50

What is the time complexity of searching an element in a balanced Binary Search Tree (BST)?

22 / 50

What will be the output of the following Java code?

class Test {
public static void main(String args[]) {
int x = 5;
System.out.println(x++ + ++x);
}
}

23 / 50

What does the following Python code do?

from sklearn.linear_model import LinearRegression
import numpy as np

X = np.array([[1], [2], [3], [4]])
y = np.array([2, 4, 6, 8])

model = LinearRegression()
model.fit(X, y)
print(model.predict([[5]]))

24 / 50

How do you implement a binary search tree (BST) in C++?

#include <iostream>
using namespace std;

class Node {
public:
int data;
Node* left;
Node* right;

Node(int value) {
data = value;
left = right = NULL;
}
};

class BST {
public:
Node* insert(Node* root, int value) {
if (!root) return new Node(value);
if (value < root->data) root->left = insert(root->left, value);
else root->right = insert(root->right, value);
return root;
}

void inorder(Node* root) {
if (!root) return;
inorder(root->left);
cout << root->data << " ";
inorder(root->right);
}
};

int main() {
BST tree;
Node* root = NULL;
root = tree.insert(root, 50);
tree.insert(root, 30);
tree.insert(root, 70);
tree.insert(root, 20);
tree.insert(root, 40);
tree.insert(root, 60);
tree.insert(root, 80);

tree.inorder(root);
return 0;
}

25 / 50

How do you implement multi-threading in Java?

class MyThread extends Thread {
public void run() {
System.out.println("Thread is running...");
}

public static void main(String[] args) {
MyThread t1 = new MyThread();
t1.start();
}
}

26 / 50

What is the output of the following C++ code?

#include <iostream>
using namespace std;

void func(int &x) {
x += 5;
}

int main() {
int a = 10;
func(a);
cout << a;
return 0;
}

27 / 50

What is memoization in dynamic programming?

def fib(n, memo={}):
if n in memo:
return memo[n]
if n <= 2:
return 1
memo[n] = fib(n-1, memo) + fib(n-2, memo)
return memo[n]

print(fib(10))

28 / 50

 What do you understand by K in the k-Mean algorithm?

29 / 50

Select the commonly used algorithm in data science regression

30 / 50

How does TypeScript improve JavaScript development?

31 / 50

What is the critical factor in choosing an appropriate node during tree construction?

32 / 50

In which library will you find class() in R programming language?

33 / 50

 AI agent can interact with its environment by using ____.

34 / 50

How does backpropagation work in a neural network?

import numpy as np

def sigmoid(x):
return 1 / (1 + np.exp(-x))

# Forward pass
X = np.array([0.5, 0.3]) # Input
W = np.array([0.2, 0.4]) # Weights
y_true = 1 # True output

z = np.dot(X, W) # Weighted sum
y_pred = sigmoid(z) # Activation function

# Backpropagation (gradient descent)
learning_rate = 0.01
error = y_true - y_pred
gradient = error * y_pred * (1 - y_pred)
W += learning_rate * gradient * X

35 / 50

____ is a component of AI.

36 / 50

What is the difference between PCA and t-SNE in machine learning?

37 / 50

Identify among the options which is not a core data type

38 / 50

What will be the consequence of the wrong choice of learning rate value in gradient descent?

39 / 50

On which approach the face recognition system is based?

40 / 50

What do you understand by ‘Naive’ in Naive Bayes?

41 / 50

What is an LSTM, and how does it improve over a standard RNN?

42 / 50

How can we optimize performance in a React application?

43 / 50

Which of these functions is not suitable for importing csv files in R?

44 / 50

What is the role of MongoDB in the MERN stack?

45 / 50

In how many ways can you analyze data in Data Science?

46 / 50

Which data analysis is concerned with steps and actions to be taken in the future to obtain a specific outcome?

47 / 50

What is the correct way to connect MongoDB with a Node.js application using Mongoose?

const mongoose = require('mongoose');

mongoose.connect('mongodb://localhost:27017/mydb', {
useNewUrlParser: true,
useUnifiedTopology: true
})
.then(() => console.log('Database connected'))
.catch(err => console.error(err));

48 / 50

Which is preferable for text analysis among Python and R?

  1. Python, quick storing
  2. R, quick sorting
  3. Python, high-performance data
  4. R, high-performance data

49 / 50

In a React application, what is the correct way to pass props from a parent component to a child component?

function Parent() {
return <Child name="John" age={30} />;
}

function Child(props) {
return <h1>{props.name} is {props.age} years old.</h1>;
}

50 / 50

What is the difference between supervised and unsupervised learning?

Event has ended

Result will declared soon

Know More About Novanectar

Scroll to Top