instruction_seed stringlengths 0 26.4k | source stringclasses 4
values |
|---|---|
Identify if the given number is prime
n = 13 | codefeedback |
Write a postfix expression to an infix expression
3 4 + 5 * | codefeedback |
Parse this JSON string and print the value of the "name" field.
json_string = '{"name":"John", "age":25}' | codefeedback |
Convert this string from snake_case to CamelCase.
snake_case_string = "example_string" | codefeedback |
Find the first 10 numbers that are divisible by 4 and 7 | codefeedback |
Create a MySQL query to select the top 5 customers with the highest total spending in the last 12 months. | codefeedback |
Create a loop to traverse through a tree using depth-first search. | codefeedback |
Transform the following function definition so it can be used for all type of data
def calculate(int a, int b): | codefeedback |
Write a JavaScript function which will return the longest palindrome string from a given strinb
"abacdaaadccb" | codefeedback |
Find the sum of all the prime numbers between 45 and 65. | codefeedback |
Calculate the value of 3^4 using Java code. | codefeedback |
Make a program that takes in a non-empty string and finds its longest palindrome. | codefeedback |
Create an algorithm to produce a Fibonacci number. | codefeedback |
Create a method to solve a linear equation ax + b = 0.
a = 2, b = 4 | codefeedback |
Make a Python program to generate all permutations of a given list. | codefeedback |
Generate the necessary SQL query to delete records from the table 'students' where the student's major is 'Computer Science'. | codefeedback |
Generate a recursive function for calculating the factorial of a number. | codefeedback |
Find all substrings of a string that are palindromes in Python. | codefeedback |
Write an Angular directive to validate input fields. | codefeedback |
Output the largest number in this array
[20, 6, 36, 41, 12, 3] | codefeedback |
Write a function to find all distinct permutations of a given list
[1,2,3] | codefeedback |
Construct an algorithm to delete duplicate characters from a string | codefeedback |
Build a machine learning model using scikit-learn to predict the house prices in Boston.
- Number of rooms: 3
- Average number of rooms per dwelling: 6
- Proportion of residential land zoned for lots over 25,000 sq.ft: 0.4
- Index of accessibility to radial highways: 4
- Full-valuation property-tax rate per $10,000: ... | codefeedback |
Implement Quicksort in Python to sort this list of integers.
[8, 5, 3, 9, 1] | codefeedback |
What is computational complexity and how can it affect the performance of a program? | codefeedback |
Write a C program that uses the bitwise operator to set, clear and toggle the Nth bit of an integer. | codefeedback |
What is the best time complexity of QuickSort? | codefeedback |
Create a class to create a naive bayes model. | codefeedback |
What is the time complexity of the most_common() function? | codefeedback |
What is the time complexity of the function you wrote to output the nth Fibonacci number? | codefeedback |
Given an array of strings, write a JavaScript function to filter out all elements that are not palindromes.
["a", " racecar", " abba ", "civic", " pot op "] | codefeedback |
Write a permutation function which takes a given string and returns all the possible permutations.
"abc" | codefeedback |
Build a regular expression to match only strings that start with one specific character and end with another specific character. | codefeedback |
Construct a SQL query to select all the records from the "user_table" table that were created in the last 3 days. | codefeedback |
Write a code to convert HTML to Markdown using Python. | codefeedback |
Create a PHP script to generate a valid checksum of a given string. | codefeedback |
Design a function using Python to remove all vowels from a string. | codefeedback |
Suggest a suitable algorithm for solving this problem.
An array of integers is given. Find the highest sum that can be obtained by including different members from the array, such that no two members have the same index. | codefeedback |
Write a web crawler in Python to extract only the text content from a given website. | codefeedback |
Suggest a suitable algorithm for clustering data points. | codefeedback |
Find the length of the longest substring in the given string without repetition.
string = "abcabcbb" | codefeedback |
Read the given CSV and output the data as a HTML table.
name, age
joe, 23
billy, 24 | codefeedback |
Given an array of words, replace each character with the corresponding number from the English alphabet (e.g. a=1, b=2 ...z=26), and find the computed sum.
["cat", "dog"] | codefeedback |
Given a linked list, reverse its order of nodes. | codefeedback |
Given an array of integers, write a program to find the number of triplets that satisfy the triangle inequality. | codefeedback |
Given a matrix, write a program to fill it with zeroes in constant time and space complexity. | codefeedback |
Create a MySQL query that returns a list of states in the United States with populations greater than 10 million. | codefeedback |
Create an SQL query that finds the most expensive products in a given product table. | codefeedback |
Using MATLAB, calculate the roots of the equation x*x + 5*x - 6. | codefeedback |
Create an assembly language program to sum 30 odd integers. | codefeedback |
Design a function that takes a number, n, and returns the n’th Fibonacci number. Remember that the Fibonacci sequence begins with 0, 1, and each subsequent number is the sum of the previous two numbers. | codefeedback |
Find the number of times the substring “ab” appears in the given string.
text = "abraacadabrabracabracabracabra" | codefeedback |
Design an algorithm to find the maximum subarray of an array of numbers. | codefeedback |
Solve the following problem
Given two strings s and t, find the minimum window in s which will contain all the characters in t. | codefeedback |
Create a sorting algorithm | codefeedback |
Create an sql query to find the following
Find the customer who has placed the highest number of orders. | codefeedback |
Construct an algorithm to fulfill the following purpose
Find the two numbers that add up to a given number N. | codefeedback |
Design a SQL query to retrieve the names of movies released in the last 10 years. | codefeedback |
Generate a permutation of a given list of numbers. | codefeedback |
Design a Node.js class to create a RESTful API. | codefeedback |
Use conditionals and a for loop to return the sum of all odd numbers up to a given number. | codefeedback |
Write a function to generate a random permutation of a given array.
[1, 2, 3, 4, 5] | codefeedback |
Find the logarithm (base 10) of a number.
1000 | codefeedback |
Multiply two matrices and return the resulting matrix.
Matrix A = [[1, 2], [3, 4]]
Matrix B = [[5, 6], [7, 8]] | codefeedback |
Create a MySQL query to fetch data from two tables using an inner join.
TableOne:
ID, Name, Age
TableTwo:
ID, School | codefeedback |
Design a database schema for a table which stores customer information? | codefeedback |
Implement a search algorithm in Java. | codefeedback |
Design a RESTful API that returns customer information. | codefeedback |
Given two arrays of integers, find a pair of values (one from each array) that you can swap to give the two arrays the same sum.
[1, 2, 3, 4], [3, 2, 1, 4] | codefeedback |
Derive the formula for calculating the circumference of a circle. | codefeedback |
Validate the email address using a regular expression.
email = "example@gmail.com" | codefeedback |
Design a program that automatically refactors a python code to improve readability and reduce complexity.
def myfunc():
x = 1
y = 5
return x + y | codefeedback |
Write a JavaScript code snippet to find the greatest of three given numbers. | codefeedback |
Write a Tensorflow model to classify a given X and Y as either positive or negative.
X = [1, 1, 2, 4]
Y = [3, 1, 0, 4] | codefeedback |
Write code to create a bar chart comparing the performance of two different algorithms.
Algorithm 1: [90, 91, 95, 94, 99]
Algorithm 2: [83, 89, 95, 91, 99] | codefeedback |
How will you debug an unresponsive Flask web application? | codefeedback |
Design an efficient algorithm to search for an item in an array. | codefeedback |
Explain why recursion is a powerful technique for solving problems. | codefeedback |
Identify the most efficient algorithm to find the maximum element in an array. | codefeedback |
How would you verify that a given string is a valid email address? | codefeedback |
Using regex, convert a string of dates from the format 'dd/mm/yyyy' to 'mm/dd/yyyy'
String "05/06/2019, 10/08/2020" | codefeedback |
Write a query to find all entries in a table called customers with postal code 32412. | codefeedback |
Train a linear regression model on a dataset containing m columns and n rows. | codefeedback |
Convert the following SQL query to its equivalent Python expression.
SELECT name FROM students WHERE age > 18 | codefeedback |
Create a class to represent a complex number with two private fields (x, y) and two public member functions (getMagnitude, increment) in Java. | codefeedback |
Create a code snippet to print the star pattern below in Python. | codefeedback |
Write an SQL query to count the number of records with age greater than 25 from a given table. | codefeedback |
Construct an SQL query that averages the grades of students belonging to the Physics department.
Table Name: Grades | codefeedback |
Construct an SQL query to search the database for the user with the highest score.
Table Name: users | codefeedback |
Write a macro in C++ that prints half of the cube of a number | codefeedback |
Write a line of code to input 10 numbers from the user. | codefeedback |
Write a function in C# to round a given number to the next closest integer.
Number: 27.7 | codefeedback |
Construct a regular expression pattern in Python that matches all emails. | codefeedback |
Write a Bash command that outputs the system's date as "DD-MM-YYYY". | codefeedback |
Create a thread-safe Java method that increments a given counter. | codefeedback |
Write a SQL query to retrieve the last four entries of a table called "students". | codefeedback |
Write a SQL query to insert new data into a table.
Table Name: users
Columns: id, name, email
Data: 1, John Doe, john@example.com | codefeedback |
Construct an object literal in JavaScript to describe a person's name and age. | codefeedback |
Implement a linked list structure with an insert method using Java. | codefeedback |
Write a code to generate n terms of the Fibonacci sequence. | codefeedback |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.