instruction_seed
stringlengths
0
26.4k
source
stringclasses
4 values
Write a function to convert a given integer number toRoman numerals.
codefeedback
Create a SQL query to find the employees with the highest salary in each job role.
codefeedback
Develop an algorithm in C++ to reverse a linked list.
codefeedback
Create a query in SQL to list all the employees with their salary, who work in the IT department and have more than 10 years of experience.
codefeedback
Write a script in Python to remove the characters from the given string which are not in the alphabet. string="!!He##ll%o W..or##ld!!"
codefeedback
debug the following code in Java to list all the prime numbers until 50 class Main { public static void main(String[] args) { for(int i = 0; i < 50; i++) { if (isPrime(i)) { System.out.println(i); } } } static boolean isPrime(int n){ } }
codefeedback
Create a Swift program to remove duplicates from a given array.
codefeedback
Write an SQL query to select distinguish the records with 'Yes' and 'No' for the field 'full_time' from 'employees' table.
codefeedback
Compare two strings and remove all letters from the first string which are present in the second string and vice versa. string1 = "Hello World!" string2 = "Bye World!"
codefeedback
Explain how binary search works.
codefeedback
Evaluate a mathematical expression given as a string. expression = "2 + 3 * 5"
codefeedback
Write a query to find records created in the last 7 days in a MySQL database. table_name: users column_name: created_at
codefeedback
Construct a for loop that prints the square of each number from 1 to 10 and also prints an asterisk after each square.
codefeedback
Create a new Java program that prints out all the prime numbers between 2 and 1000.
codefeedback
Develop a DFS algorithm in Python.
codefeedback
Develop a program to accept one number from the user and display its factorial using a Python function. 5
codefeedback
Develop a function in Python to filter out all negative numbers in a given list. [2, 3, -1, 4, -5, 6]
codefeedback
Implement a function in AngularJS to register a new user.
codefeedback
What is the best way to sort an array in C#?
codefeedback
Create an SQL statement to select the records of students whose age is greater than 25.
codefeedback
Write a function to transform a dataset into a matrix, where rows represent data points followed by their labels. dataset=[(2, 3, 1), (5, 4, -1), (1, 8, 1)]
codefeedback
From the given list, create a dictionary where keys will be the elements and the values will be their corresponding indices. elements = ["one", "two", "three", "four"]
codefeedback
Write a SQL query to find the names of the top 10earning authors. SELECT Name FROM Authors ORDER BY earnings DESC LIMIT 10
codefeedback
Implement selection sort to sort a list in non-decreasing order list = [9, 5, 3, 1, 8]
codefeedback
Create a code to calculate the most frequent character in a given string s = "Hello world!"
codefeedback
Create a class called Cat to represent a type of pet.
codefeedback
Given an array of integers, write a function to check if the sum of any two of them equals the given parameter ‘n’. array = [2, 4, 6, 8] n = 10
codefeedback
Print all the prime numbers in the range of 2 to n. n = 10
codefeedback
Write a web crawler for a specific website.
codefeedback
Design an algorithm to calculate the maximum profit for buying/selling 1 share of a company's stock. Share Prices = [9, 11, 8, 5, 7, 10]
codefeedback
Create a program in Java to create a simple calculator that has the ability to add, subtract, multiply, and divide numbers.
codefeedback
Construct a SQL query to find all the customers who live in California and have more than 5 reviews.
codefeedback
Explain how proxy objects work in JavaScript.
codefeedback
You need to write a regular expression that will match any string containing only the letters 'a' and 'b'.
codefeedback
Write a code that prints the even numbers from 10 to 0 in descending order.
codefeedback
Design a database with tables and columns representing customers, orders and products.
codefeedback
What is the time complexity of linear search in an unsorted array?
codefeedback
Read a given text and classify each sentence as true or false. text = "The sky is blue, the sea is blue. The grass is green."
codefeedback
Create a function to generate a list of prime numbers between 2 and n.
codefeedback
Generate a random string of length 10 consisting of letters and numbers.
codefeedback
Given a binary tree, write a code to search a given value in the tree.
codefeedback
Construct a code segment to find all unique characters in a given string. String: Geeksforgeeks
codefeedback
Create a loop that takes a given number as input and outputs its prime factors. Number: 35
codefeedback
Display a chart on the page to show the data.
codefeedback
Merge two binary trees t1 and t2 into a new binary tree. t1 = 1 / \ 4 5 / \ 8 9 t2 = 2 / \ 7 8 / 9
codefeedback
Given two sorted arrays nums1 and nums2, combine their elements into a single array that is sorted. nums1 = [1, 2, 3] nums2 = [2, 4, 5]
codefeedback
Write a function to determine if a given string is a valid English word or not. s = "construct"
codefeedback
Given two unsorted arrays, merge them in a sorted form without using any extra space. nums1 = [5, 8, 2] nums2 = [7, 1]
codefeedback
Write a SQL query to display the names and ages of students older than 25.
codefeedback
Implement a Java class for a LinkedList.
codefeedback
Create an algorithm in Java for maximum subarray problem.
codefeedback
Calculate the Fibonacci sequence up to the n-th number where n is provided as an argument.
codefeedback
Create a program to find the nth element of the Fibonacci sequence.
codefeedback
Use TensorFlow to build a deep learning model for predicting the price of a given stock.
codefeedback
Write a controller in Ruby for processing user sign up requests.
codefeedback
Create a web service for sending a daily email reminder.
codefeedback
How would you write a query in SQL to return the names of all customers who have purchased over $100 in the last month?
codefeedback
Given a list of words, write a function to check if the list contains any palindrome words. words = ["racecar", "level", "tot", "trot"]
codefeedback
Given two numbers N and M, write a program to find the number of numbers from 1 to N where the last digit is less than or equal to M. N = 30, M = 7
codefeedback
How is the Julia dynamic programming technique different from bottom-up dynamic programming?
codefeedback
What approaches are available for the optimization of a neural network?
codefeedback
Given a sentence, find the first verb in the sentence. Sentence: She shouted and cheered when she saw her result.
codefeedback
Create a regular expression that verifies the following pattern: contains one or more digits followed by a hyphen followed by one or more digits.
codefeedback
Design a method which takes in two sorted array of size n and m, and returns a new sorted array of size n + m int arr1[] = {1, 3, 5, 7}; int arr2[] = {2, 4, 6, 8};
codefeedback
Write a SQL query to print the name and total orders of each customer
codefeedback
Write a function to take a list of strings and return only the words made up of the same letter. word_list = ["aaa", "cab", "bba"]
codefeedback
Write a function to print out the triangle pattern as shown in the example. height = 3
codefeedback
Suggest a function name for a function that reverses a string.
codefeedback
Write a code to perform a depth-first search on a binary search tree.
codefeedback
Given a string, what is the best way to reverse the characters in it? <noinput>>
codefeedback
Write a code that takes the input of two strings, and returns the longest common substring in them.
codefeedback
How can you create a string of all random characters of length 10 in Python?
codefeedback
Improve the following code by implementing a more efficient algorithm. def FunctionA(arr): output = [] for elem in arr: if elem > 0 and not elem in output: output.append(elem) return output
codefeedback
Implement a recursive method to find the sum of all numbers from 1 to n. The method should take an integer n as its argument. 4
codefeedback
Suggest a better algorithm for finding a prime number.
codefeedback
How would you use regex to identify a valid ip4 address?
codefeedback
Reverse a given string using recursive function in Python.
codefeedback
You need to add a feature to the existing code in the given input. class Car: def __init__(self, make, model, year): self.make = make self.model = model self.year = year
codefeedback
Design a function to evaluate an expression represented as a string. expression = "2.0+2.1"
codefeedback
Generate a working Angular program
codefeedback
Generate a working Android program to display a simple string
codefeedback
Program a function in C++ which finds the number of duplicate elements in an array. array: [1, 3, 2, 5, 2, 3]
codefeedback
Implement a function in Python that calculates the Levenshtein Distance of two strings. str1 = "hackathon" str2 = "hack"
codefeedback
Create a function in Python that takes two parameters and returns the sum of squares of all numbers between them
codefeedback
Create an algorithm that finds the maximum subarray sum in a given array. [-2, 1, -3, 4, -1, 2, 1, -5, 4]
codefeedback
How would you reverse the words order in a given string?
codefeedback
Write a function that takes a positive integer and returns the next number which is divisible by 7.
codefeedback
Given a string and an integer N, write a Python function to construct the Nth palindromic string.
codefeedback
How can we delete all the elements of a list in Python?
codefeedback
Design a basic graphic user interface (GUI) for a calculator.
codefeedback
How can you remove all blank spaces from a given string in Python?
codefeedback
Parse the following JSON string and print out all the key-value pairs: {“name”:”John”,”age”:25,”city”:"New York" String = '{"name":"John","age":25,"city":"New York"}'
codefeedback
Design and implement a function that takes a string as input and returns the reverse string.
codefeedback
Create a SQL query to add 1 to a designated row in a table. Table: users Row: age Location: id = 4
codefeedback
Construct a Numpy array of shape 2x3 containing all 7s.
codefeedback
Create a function to print all the paths in a binary tree.
codefeedback
Write a Bash script to print the system date in the format "year-month-date".
codefeedback
Write an R function that determines the average value of an integer array.
codefeedback
Write a function in Python to get the IPv6 address of a given domain name.
codefeedback
Create a class named Animal with a few methods describing different attributes of animals.
codefeedback