instruction_seed
stringlengths
0
26.4k
source
stringclasses
4 values
Write a code to fetch the last ten news headlines from HackerNews using their API.
codefeedback
Write a code to implement quicksort. arr = [6, 1, 8, 4, 9, 5]
codefeedback
Write a SQL query to retrieve the total amount of purchase each customer has made. Table:Customer_orders |userid|product |purchase_price| |------|--------|--------------| |1 |shoes |50 | |2 |socks |30 | |1 |pants |20 |
codefeedback
Using C#, write a method that returns a list of strings containing only elements of an input string array containing the letter 'a'. string[] s = {"apple", "banana", "cat"};
codefeedback
Design a neural network for facial recognition using TensorFlow.
codefeedback
Write a code to recognize the most likely language of a given text.
codefeedback
Create a program to generate a sequence of integers that starts at k and ends at n in the following format: [k, k+1, ..., n-1, n]
codefeedback
Generate a code snippet to clone/copy a dictionary.
codefeedback
Create a program to reverse an array in place, i.e. without creating a copy.
codefeedback
Classify this short programming code into its data structure category. h = [x for x in range(2, 101, 2)]
codefeedback
Find the value of $x^2 + 4x + 5$ when $x = 3$
codefeedback
Write a code in C to identify the character type of a given character. $
codefeedback
Sort this numeric array in descending order Array: [3, 7 ,1, 5, 9]
codefeedback
Create a class 'Stack' that has a method 'max_stack' that returns the maximum element in the stack.
codefeedback
Identify the type of data present in the given JSON string. String: [true, false, 0, "Sample String"]
codefeedback
Create a code to check whether two words are nearly identical. Word A: bte Word B: tree
codefeedback
Write an SQL query to find the name of all customers who have made orders before the given date. Table: Customers Fields: name, order_date Given_date = 17/2/2020
codefeedback
Given a string s, reverse its characters and return the resulting string. s = "apple"
codefeedback
Write a function that takes a string and returns the letter which appears most frequently. s = "apple"
codefeedback
How to find the most common integer in a list?
codefeedback
Using Python, write a code to generate the Fibonacci series up to the given number. num = 10
codefeedback
Code an assembly language program to calculate the sum of series 1 + 3 + 5 +.....+ (2*n-1). n = 6
codefeedback
Design a HTML document to display a chart with the sales of a particular item.
codefeedback
Create a system call in C to generate a process tree.
codefeedback
How is a binary search tree different from a binary tree?
codefeedback
Identify the ‘time complexity’ of an algorithm written in Java that calculates average of all elements in a list.
codefeedback
You are given some HTML code, write a function to strip the tags from it.
codefeedback
You are given two strings, find the minimum number of edits required to make them equal.
codefeedback
Create a program to list all the prime numbers between two numbers
codefeedback
Describe the runtime complexity of segment tree.
codefeedback
Generate an array containing numbers between 1 and 100 that are divisible by both 5 and 7.
codefeedback
Explain the concept of Binary Indexed Tree.
codefeedback
Design a data structure to track the frequency of words in a given text.
codefeedback
Write a code snippet to produce an XML result for a given input data structure. key1: value1, key2: { key2.1: value2.1, key2.2: value2.2 }
codefeedback
Find the maximum value of an array without using any built-in functions [7, 9, -2, 15, 3]
codefeedback
Develop an algorithm for reversing a string without using any reverse string methods. Hello World
codefeedback
Create a regex expression that matches all valid IP addresses.
codefeedback
Answer what is the longest palindrome in a given string. "Run, spot, run. He ran up red hills"
codefeedback
Construct a code to get the last index of a given substring in a string. "hi hi hello", "hi"
codefeedback
Write a function in JavaScript that takes two strings as arguments and checks if the characters in the first string form a subsequence of the characters in the second string.
codefeedback
Write a C++ program for finding the maximum value in a BST.
codefeedback
How to identify an email address from a given string using Regular Expressions?
codefeedback
Write an Android app to display a list of items from a local database.
codefeedback
Build a REST API with Node.js which provides the current temperature and humidity data of a given location.
codefeedback
Using SQL, write a query to identify the student ID and the name of the student who scored the highest marks in a given subject.
codefeedback
Design a class named "Rectangle" that prints out the length, width, area and perimeter of a given rectangle.
codefeedback
Edit the code to construct a bubble sort algorithm. arr = [5, 2, 1, 7, 8]
codefeedback
Write a recursive method to calculate the Fibonacci number of a given index
codefeedback
Analyze the given sentence and label each word according to its part of speech. Sentence: She was embarrassed to open the door.
codefeedback
Develop a PHP web application for a movie theater booking system.
codefeedback
Design a CSS style sheet to format a web page.
codefeedback
Add a new column to a Pandas DataFrame called "age_group" that contains categorical values "young","adult","elderly". name age John 25 Mark 45 Isabelle 75
codefeedback
Using string functions, capitalize each word in the given sentence. sentence = "python is a programming language"
codefeedback
Create a function that takes two arguments, "start" and "end", and returns a list of all the prime numbers between the two.
codefeedback
Sort the following list using a bubble sort algorithm. [36, 71, 16, 21, 73]
codefeedback
Define a function called my_function that will take a string as an argument and returns the string with all the vowels removed.
codefeedback
Create a SQL query to find the name and age of the oldest person in the database. Table Name: people Columns: id (integer), name (string), age (integer)
codefeedback
Edit the given SQL query to find the maximum salary SELECT MIN(salary) FROM employees
codefeedback
Write a code snippet to implement bubble sorting in an array of 10 numbers.
codefeedback
Given two equations, predict the range of the output variable. Equation 1: Y = X + 2 Equation 2: Y = 2X
codefeedback
Write a code to delete a node from a given BST.
codefeedback
Write a code to split a list of numbers into two sets with equal sum [1, 2, 3, 4, 5, 6, 7]
codefeedback
Create a program to find the maximum length common subsequence of two given strings. String1: "abcdgf" String2: "abcdhfe"
codefeedback
Write all the possible combinations for the strings, "ABC" and "XYZ".
codefeedback
Write a Java program to implement Matrix multiplication
codefeedback
Create a function that takes a 2D array of numerical values and returns the number of times the maximum value appears. my_array = [[1, 2, 4, 1], [2, 3, 3, 2], [3, 4, 3, 3]]
codefeedback
Use Python to sort a given list of strings. myList = ["bananas", "oranges", "apples", "peaches"]
codefeedback
Build a regression model to predict house prices based on crime rate and school quality.
codefeedback
Write a SQL query to find the highest student GPA within a specific course.
codefeedback
Find the last 10 digits of the result of raising 2 to the power of 1000.
codefeedback
Analyze the given text using opinion mining. The new iPhone is awesome, I love it!
codefeedback
Construct a program that can calculate the factorial of a number using a while loop
codefeedback
Create a program to find the longest substring with unique characters
codefeedback
Construct a function to detect if a binary tree is balanced
codefeedback
Create a JavaScript function to find the length of the longest common substring between "apple" and "pineapple".
codefeedback
Create a SQL query to get the highest salary in the table 'Employee'
codefeedback
Implement a function in C that given inputs x, y and z, return the largest of them. x = 3, y = 4, z = 6
codefeedback
Build a MapReduce job with Hadoop to find the 99th percentile of a given data set.
codefeedback
Write a code to get the top 10 trending topics on Twitter with their volume using the Twitter API.
codefeedback
Create a program using PHP to display the length of the longest common substring in two given strings.
codefeedback
Suggest a solution for validating a password which should contain at least 1 uppercase character, 1 lowercase character and 1 digit.
codefeedback
Create a script in Python which takes a number as an argument and prints its corresponding nth Fibonacci number.
codefeedback
Explain how to detect prime numbers in Python.
codefeedback
Train a machine learning model to classify cats and dogs.
codefeedback
Write code to detect the dominant language in a string. This is a test string with multiple languages, including French, Spanish, and English.
codefeedback
Write a class in Python to represent a division with two integers and the following operations: addition, subtraction, multiplication and division.
codefeedback
Compare 2 databases and update non matching information from database A to database B using SQL. Table A: | name | age | |------|-----| | John | 20 | | Joe | 25 | Table B: | name | age | |------|-----| | John | 25 |
codefeedback
Construct a for loop that prints out all prime numbers between 500 and 1000
codefeedback
Compute the maximum value in a random array [4,6,9,2,11,7]
codefeedback
Create a program that finds the sum of all numbers divisible by 4 between 150 and 300
codefeedback
Construct an SQL statement to select data from two tables.
codefeedback
Identify which line of code contains a syntax error? def getFibonacciNumber(n): a, b = 0, 1 for i in range 0, n a, b = b, a + b return a
codefeedback
Calculate the sum of all the multiples of 3 and 5 between 0 and n n = 10
codefeedback
Write a SQL statement to delete all records from a table called 'students' where the grade is below 3.
codefeedback
Design a class in Java to represent a stack data structure, and implement operations such as push, pop and size.
codefeedback
Rewrite the following php code in a more efficient manner $string = "Hello World!"; for ($i = 0; $i < strlen($string); $i++){ echo $string[$i] . "\n"; }
codefeedback
Generate a code to form a Pascal Triangle with the given input. n = 5
codefeedback
Parse the following HTML content and retrieve the values from the key elements. <li><a href="/home">Home</a></li> <li><a href="/about">About</a></li>
codefeedback
Change the following linked list into an array. Linked list: 1->3->5->7->9
codefeedback
Using the input as a guide, write code that prints out a copy of the 2d matrix with its elements transposed. matrix = [[1,2,3],[4,5,6],[7,8,9]]
codefeedback