instruction_seed
stringlengths
0
26.4k
source
stringclasses
4 values
Explain the difference between interface and abstract class in Java.
codefeedback
Recognize the type of a credit card from the given string of numbers. 4111 2029 3219 9480
codefeedback
Formulate an SQL query for finding the students who have scored over 80% in the test.
codefeedback
Design a SQL query to retrieve data from multiple tables.
codefeedback
Convert a given binary tree to a doubly linked list.
codefeedback
Sort the array of strings lexicographically. arr = ["james", "john", "bob", "michelle"]
codefeedback
Suggest a SQL query to retrieve the 10 most populous cities in the USA.
codefeedback
Suggest code to delete an element from a linked list in Java.
codefeedback
Compute the product of two matrices. A [[2, 4], [3, 7]] B [[9, 2], [7, 1]]
codefeedback
Construct a React component to display a login form.
codefeedback
Calculate the factorial of x and store it in the variable y. x = 5
codefeedback
Given an array of n elements and an integer k, find the subarray with the maximum sum less than k. arr = [1, 4, 6, 8, -5, 7], k = 11
codefeedback
Name the outlier value in the following array of integer values arr = [121, 124, 127, 130, 135]
codefeedback
Sort an array of integers according to their frequency of occurrence arr = [1, 1, 2, 2, 2, 3, 4, 4]
codefeedback
Insert a given element into the correct position of the list. list = [1,3,4,5] element = 2
codefeedback
Write a function to rearrange the elements of an array in such a way that no two same numbers are adjacent to each other. mylist = [2, 5, 9, 2, 1, 5, 9, 0]
codefeedback
Develop an algorithm in Java for finding all the possible combinations of a given list of numbers. lst = [1, 2, 3, 4]
codefeedback
Suggest a way to gracefully handle errors in Python code.
codefeedback
Find the length of the longest substring without repeating characters string = "abcabcbb"
codefeedback
Implement a SQL query to find the longest string present in a column.
codefeedback
Find the sum of all the items in this array of integers. [3, 8, 17, 29, 32, 33]
codefeedback
Write a SQL query to select all the books written by a specific author. author: "Robert Louis Stevenson"
codefeedback
Write an Android app for creating and playing a quiz competition.
codefeedback
Develop a web application that converts text to speech.
codefeedback
Write a Recurrent Neural Network (RNN) in Keras for sentence classification.
codefeedback
Construct an XML document for storing a collection of books and their authors.
codefeedback
How can we inverse the numerical order of elements stored in an array?
codefeedback
Compute the mean of a list of integers within the range of 1-5. [1, 2, 4, 3, 5]
codefeedback
How can we sort a dictionary by value in Python?
codefeedback
Construct an object in JavaScript to model a car with make, model, year, color, and price as attributes.
codefeedback
Reverse the words of the sentence "The quick brown fox jumps over the lazy dog".
codefeedback
Find the runtime complexity of the following algorithm in Big-O notation. def add_array_elements(arr): n = len(arr) sum_elements = 0 for i in range(0, n): sum_elements += arr[i] return sum_elements
codefeedback
How would you create a socket connection between two computers in a network?
codefeedback
Create an inheritance hierarchy of three classes, "Person", "Student" and "Professor"
codefeedback
Process the given HTML code to get the output as shown. <div> An article about <a href="https://en.wikipedia.org/wiki/Python_(programming_language)">Python Programming Language</a> <br/> <b>Last updated: 2019/05/09 </b> </div>
codefeedback
Normalize the given string to lowercase and remove all punctuation marks. Hey! How are you?
codefeedback
Given a list of prices, use a comprehension to calculate the average price. prices = [2.50, 3.25, 4.00, 1.75]
codefeedback
Given a list of words, create a reverse lookup dictionary (word as key, indices as values). words = ['apple', 'ball', 'cat', 'ball']
codefeedback
How would you describe the process of creating a class in Java?
codefeedback
Output the most frequent letter in a given string s. String s = "Hello World!"
codefeedback
Create a code that sums the first n Fibonacci numbers. num = 5
codefeedback
Write a query in SQL to select records with a timestamp between two dates. Start date: 2020-02-10 End date: 2020-02-15
codefeedback
Generate a randomly generated 8 character alphanumeric string.
codefeedback
Create a SQL query to select all the records from the table ‘fruit_list’ that have an expiry date falling within the next 10 days.
codefeedback
Write a Python script to generate random passwords with a combinations of 6 letters and numbers.
codefeedback
Create a code that removes all duplicates from an input array Array = [1,2,3,3,2,1]
codefeedback
Create a Java program that prints out the Fibonacci series within a given range Range = (5, 15)
codefeedback
Write a function in Python to generate all permutations of the given list of letters. ['a','b','c','d']
codefeedback
Rewrite the above function in Python to use binary search algorithm instead of linear search. data = [7, 13, 11, 9, 12] search_num = 9
codefeedback
Solve this challenge using Java. Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + n...
codefeedback
Create a program that prints the triangle pattern given a number of rows. 5
codefeedback
Reverse the list without using built-in list functions list = [1, 2, 3, 4, 5]
codefeedback
Write a SQL query to list the names of all the customers with credit score greater than 800.
codefeedback
Remove the duplicates in a list. arr = [1,2,1,2,3]
codefeedback
Write a a code to find all the prime numbers from 0 to 100
codefeedback
Implement a function to compute the binomial coefficient.
codefeedback
Generate a random string of 16 characters containing both alphabetical and numerical characters.
codefeedback
Given a two-dimensional array of integers, find the maximum sum of numbers you can find by tracing a path from the top-left to bottom-right corner. [[1, 5, 4], [2, 3, 4], [1, 9, 3]]
codefeedback
Given a linked list, write a function to find the nth to last node.
codefeedback
Write an algorithm to find the maximum subarray sum within the provided input array. [-2, 1, -3, 4, -1, 2, 1, -5, 4]
codefeedback
Given a binary tree, write a function to determine whether it is a valid binary search tree.
codefeedback
Construct a SQL query to find the names of all customers that have an order with an order amount higher than $1000. Table: customers Table: orders
codefeedback
How to remove all special characters from a string? string="It@#$%^&*( ) is a;?.incredible# time"
codefeedback
How to delete all elements from a given set?
codefeedback
Write an SQL query to select all the students with a GPA greater than 3.5.
codefeedback
Given a binary tree, print out a post-order traversal of its nodes.
codefeedback
Write a function to delete a node from a linked list given the pointer to the node to be deleted.
codefeedback
Generate a regex pattern for valid emails
codefeedback
Print all the permutations of a given list [1, 2, 3]
codefeedback
Write a function to print the permutations of a given string.
codefeedback
You need to sort an Unsorted Linked List in ascending order. head -> 10 -> 8 -> 5 -> 12 -> 15
codefeedback
Read an array from stdin and find the maximum element in it. [3, 8, 5, 6, 1]
codefeedback
Convert the following SQL query into a Python pandas DataFrame. SELECT product.name, store.location, store.country FROM product INNER JOIN store ON product.store_id = store.store_id
codefeedback
Write a Swift function to parse a JSON string into a dictionary.
codefeedback
Explain what a sorting algorithm is and describe one.
codefeedback
Write a shell script that prints out the directory this command was run from.
codefeedback
Create a GUI interface for a multiplayer card game using PyQt5.
codefeedback
Create an artificial neural network in PyTorch to predict the next word in a sentence.
codefeedback
Compare and contrast the two most popular NoSQL databases - MongoDB and Redis.
codefeedback
Write a SQL query to delete all entries that has a value of "NULL" in the field "name".
codefeedback
Rewrite the following Java loop as a compact list comprehension. int[] array = {1, 2, 3, 4, 5}; int[] array2 = new int[array.length]; for(int i=0; i<array.length; i++) { array2[i] = array[i] + 1; }
codefeedback
How do you create a new list in Python from a given list that contains the square of each element?
codefeedback
Devise a recursive solution to the problem. Find the sum of all numbers from 1 to N
codefeedback
Modify the following code so that it prints the Fibonacci numbers up to the given number x = 10
codefeedback
Create a function to find all anagrams of a given word. word = "abbac"
codefeedback
How can you change the given string 'Hello World' to 'World Hello'?
codefeedback
How can you find the severity of a given error?
codefeedback
Create a class in python with three functions, two of which must be called `add` and `subtract`.
codefeedback
What type of neural network is used for language generation?
codefeedback
What data structure is adopted to reflect the hierarchical structure of XML documents?
codefeedback
Write a code to make an API call to a remote server.
codefeedback
Write a Python program to remove duplicates from a list of dictionaries based on their values for a given key. original_list = [{'name':'John', 'age': 25}, {'name':'Jim', 'age': 25}, {'name':'Lisa', 'age': 20}]
codefeedback
Without using any built-in functions, generate a Python code to remove the duplicated elements in a list
codefeedback
Write a MongoDB query to find which roles have Permission 2
codefeedback
Generate a complete javascript code that calls the fetch() API with a certain url https://www.example.com
codefeedback
Default a neural network architecture to classify the handwritten digit from 0 to 9.
codefeedback
Create a Date object containing tomorrow's date.
codefeedback
Write a regex pattern to match all characters in a string that start with a lowercase letter.
codefeedback
Create a function that takes two strings and finds the longest common substring between them.
codefeedback
Create a program that takes a given string and returns the frequency of each alphabet character.
codefeedback