instruction_seed
stringlengths
0
26.4k
source
stringclasses
4 values
Update a MySQL table to increase the salary of all employees by 10%. Employess table contains the following columns: - id: Integer - name: Text - salary: Number
codefeedback
You need to design a calculator class with methods to perform basic calculations (add, subtract, multiply, divide, etc.).
codefeedback
Create a program to print out all prime numbers below 100.
codefeedback
Design a data structure to store an undo history of size k.
codefeedback
Construct a for-loop for calculating the factorial of a given number. Number: 5
codefeedback
Define a function in Python to print a pattern of right-angled triangles of different sizes
codefeedback
Write an SQL query to return the names of workers whose salary is within the top 25% among all workers. Table Schema: table_workers(id int, name varchar, salary int)
codefeedback
Extract the common key words from the given two strings using a Python script. String 1: This programming language is easy to learn String 2: Comparing to other languages, this language is simpler
codefeedback
Construct a for-loop for finding all prime numbers between 1 and 50 in Python.
codefeedback
Reverse the order of the given array without using inbuilt functions. nums = [12, 23, 34, 45]
codefeedback
Randomly rearrange the elements of the given array. nums = [12, 23, 34, 45]
codefeedback
Write a code to find the longest substring of given string with length greater than or equal to 2 without repeating letters. string = "abcdexyeffgghh"
codefeedback
Find the first 5 numbers in the Fibonacci sequence.
codefeedback
Write a function in Python that takes two strings and returns a single string with the characters in alternating order. "Hello", "World!"
codefeedback
Write a Python class to implement a linked list.
codefeedback
Write a function that determines if a given substring is present in a string or not.
codefeedback
Generate a random password with at least 8 characters that contain both upper and lowercase letters and numbers.
codefeedback
Given an array of integers, create a program that finds the longest subarray with a sum of 0.
codefeedback
Calculate the sum of all numbers in the given array that are multiples of the given number. numbers=[2, 4, 6, 8, 10, 12] num=3
codefeedback
Design a function which takes a parameter and returns the sum of its cube of its digits
codefeedback
Write code to implement a priority queue in Python.
codefeedback
Suggest a completion for the following code which will print the sum of all digits in the given number. num = 10121 total = 0 while num > 0:
codefeedback
How can you generate a random array of 10 integers between 1 and 100?
codefeedback
Write a JavaScript function to generate a random strong password with length 8-10.
codefeedback
Design an algorithm to check for missing numbers in an array of size n.
codefeedback
Create an algorithm to find the longest substring of a given string with distinct characters. Given string = "abcabcabc"
codefeedback
What is the maximum depth of a binary tree of size n?
codefeedback
Convert a given array of numbers into a square matrix. Given array = [1, 2, 3, 4]
codefeedback
Write a code snippet that prints out the number of times each character appears in a given string. Given string = "welcome"
codefeedback
Design an algorithm that prints all the permutations of a given string.
codefeedback
Write a function that takes a list as a parameter and returns only the unique elements in the given list. [2, 4, 5, 2, 4, 8]
codefeedback
Write a code to send a message "Hello World!" using the Twilio API.
codefeedback
Convert the following floating-point number to its binary representation. Number: 12.25
codefeedback
Create a function to perform insertion sorting list = [5, 3, 8, 7, 1]
codefeedback
Generate a code to create a Pyramid of stars with the given height.
codefeedback
Provide the big-O complexity for a binary search Algorithm.
codefeedback
Write an SQL Query to print a list of all employees who have a higher salary than their managers.
codefeedback
Build a web scraper that stores the main titles and content of article links from a given website. Website: https://www.techvoice.org/
codefeedback
Given a single linked list, reverse it in place. Head -> 1 -> 2 -> 3 -> 4 -> 5 -> None
codefeedback
Make an array containing all elements of the given list that are even. [43,55,12,23,44]
codefeedback
Write an assembly language code to find the sum of two values stored in memory.
codefeedback
Write a for loop that prints out the series: 0, 4, 8, 12
codefeedback
Given a linked list, swap the positions of the two nodes in the list. Linked List: 1->2->3->4->5
codefeedback
Construct a SQL query to group students by the grade they got, and calculate the average score.
codefeedback
Compute the GCD of two numbers without using any built-in functions from your language. Number1: 9 Number2: 6
codefeedback
Calculate the result of the following expression: 63 × 42
codefeedback
Create a random password generator in Python that outputs 10 characters of random alphanumeric characters.
codefeedback
Write a C++ program that takes two 2D arrays and compares them for equality. arr1 = [[1,2], [2,4]] arr2 = [[1,2], [2,4]]
codefeedback
Write a PHP function that takes a string and returns the same string with all vowels replaced with the letter 'x'.
codefeedback
Generate a best-fit line for data points {(2,4), (4,7), (6,8), (7,11)} in Python.
codefeedback
Write a script in Python that takes a list of strings and prints out the first letter of each string in uppercase. A = ["apple", "banana", "grapes"]
codefeedback
Write a code that generates a random password of 8 characters including numerical and alphabetic characters.
codefeedback
Generate a correct code to compare two date objects
codefeedback
Given a n x n matrix where each element is 0 or 1, how can you find the area of the largest square sub-matrix composed of only ‘1s’?
codefeedback
What is the difference between deep copy and shallow copy in Python?
codefeedback
Create a TensorFlow model to recognize handwritten numbers.
codefeedback
Write a code to find the first 4 terms of the Fibonacci sequence in Java.
codefeedback
Using Ruby, Create a method that converts a number to its equivalent in Roman numerals.
codefeedback
Write a line of MySQL query that selects all rows from a table called 'employees' where the salary is greater than 55000.
codefeedback
Find the index of the largest element in the array [2, 3, 5, 7, 25, 30].
codefeedback
Write a JavaScript function to convert a given string to title case (every word must start with a capital letter).
codefeedback
Write a SQL query that returns the maximum price of a product from the products table.
codefeedback
You need to write an HTML page with two forms, one for registering a new user and the other for logging in an existing user.
codefeedback
Construct a logic circuit that implements a three input AND gate.
codefeedback
Write a script in Python for drawing a rectangle on the screen.
codefeedback
Write a code to get the number of unique elements in a given list.
codefeedback
Create a program to guess a secret number between 1 and 100.
codefeedback
Edit the given code to print out the largest even number in the given list. lst = [1, 8, 9, 10, 6]
codefeedback
Generate a code to convert a given number to its English word equivalent.
codefeedback
Create a function in Python to calculate the sum of the square of all numbers from 1 to n.
codefeedback
Design a C++ program to get the frequency of a subarray in an array. arr = [1,2,2,2,2,2,3,4,5], subarr = [2,2]
codefeedback
Design a neural network architecture in TensorFlow to predict the sentiment of a movie review
codefeedback
Identify three patterns in the following list of numbers: 1, 4, 6, 10, the 15.
codefeedback
Write a SQL query to get the products that have been purchased in the last month
codefeedback
Separate the given array of numbers into two new arrays, where one array contains even numbers and the other array contains odd numbers. [9, 4, 57, 28, 24, 10]
codefeedback
Count the number of sub strings of length 3 that are present in the sentence. This is an example sentence
codefeedback
Write a code segment that manipulates a Fibonacci sequence until the sum is greater than a given number. 10
codefeedback
Design a Python program to print all numbers between 0 and 100 that are divisible by 3 and 5.
codefeedback
Design a SQL query to get the salary of employee who has the maximum salary in each department.
codefeedback
Find the maximum element in a given array (unsorted) using a linear search approach. [10, 5, 15, 80, 25]
codefeedback
Write a Java program to print the Fibonacci sequence starting from given number. Starting Number: 10
codefeedback
Given a 2D array of integers, write a Java method to find the sum of an hourglass pattern. The 2D array of integers are: [[1, 1, 1, 0, 0, 0], [0, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0], [0, 0, 2, 4, 4, 0], [0, 0, 0, 2, 0, 0], [0, 0, 1, 2, 4, 0]]
codefeedback
How do you create a new dataframe from existing two pandas dataframes?
codefeedback
How do you use the Set structure in Java?
codefeedback
Debug a logic error in this JavaScript code that returns the wrong result. function multiply(a,b) { return a + b; }
codefeedback
Create a Java program to implement a doubly linked list with the following operations: insert, delete, display.
codefeedback
Construct a program which takes two numbers as input and returns the multiplication of these numbers. 8, 4
codefeedback
Create a C++ program to concatenate two string variables. string1 = "Hello" string2 = "World"
codefeedback
Write a code to create a function to rotate a given linked list.
codefeedback
Compress the following string using LZW compression. Input: ‘ABBBCDCDEFFG’
codefeedback
Implement FTP server in Python
codefeedback
Write a method to find duplicate elements in an array of integers.
codefeedback
There is a string of code. Can you tell me if there are syntax errors in it? def foo(): print('bar
codefeedback
Using Java, write a program to find the sum of natural numbers from 1 to an input number. 10
codefeedback
Given two strings, write a program to find the number of common characters. string_1 = "computer" string_2 = "science"
codefeedback
Given a JavaScript code, what are valid identifier names for its variables?
codefeedback
Write a Node.js code to get a list of the most starred Node.js repositories on github in the last month.
codefeedback
Write a function in Java to generate all possible strings of length n drawn from 0–9.
codefeedback
Create a SQL query to find the names and addresses of customers who have purchased a product that is priced more than $50. TABLE customers Columns: * customer_id * first_name * last_name * street * city * state * zip TABLE orders Columns: * order_id * customer_id * order_date TABLE order_items Columns: ...
codefeedback
Suggest a way to classify text documents into a certain number of topics.
codefeedback