instruction_seed
stringlengths
0
26.4k
source
stringclasses
4 values
Launch an instance of an Amazon EC2 machine.
codefeedback
Using a recursive algorithm, reverse the order of elements in a list. arr = [1, 2, 3, 4, 5]
codefeedback
Create a structure for a student in C.
codefeedback
Calculate the distance of two points located in the 3-dimensional space. Point 1: (3, 4, 5) Point 2: (2, 6, -1)
codefeedback
Rewrite the code such that it uses thread-safe code and prevents race conditions. int x = 0; //This is the Thread Task void increment(){ x++; }
codefeedback
Using the code provided, write a JavaScript function that checks if a given number is prime or not.
codefeedback
Replace the comment in the code with a line of code that prints the index of the maximum value in the list. list_a = [5, 8, 3, 6, 9]
codefeedback
Write a code to generate a list with the first 20 Fibonacci numbers.
codefeedback
Write a set of if-else statements to convert numerical grade 1-100 to their letter grade equivalent.
codefeedback
Take in a list of integers and return true if any of the numbers in the list are prime numbers. [2, 3, 5, 7]
codefeedback
Implement quicksort algorithm in Python for a list of integers. [4, 2, 5, 3, 1]
codefeedback
Using a switch-case statement, calculate the grade for the student using the percentage in the input. Student percentage: 80
codefeedback
Reverse a string of characters and words. Hello World
codefeedback
Create a regular expression to match strings containing two consecutive symbols "#" followed by four alphabetic characters.
codefeedback
Develop a custom API endpoint for an online store using Node.js.
codefeedback
Design a REST endpoint for a web-scraping application.
codefeedback
Create a program in JavaScript that calendarizes the upcoming week based on the current date.
codefeedback
Write a regular expression to validate a password containing at least 8 characters, one uppercase letter, one lowercase letter and a special character.
codefeedback
Create a Python script to generate a random password of 8 characters that contains an uppercase letter, a special symbol and a number.
codefeedback
Write recursive function in JavaScript which reverses a given string. My name is John
codefeedback
Create a processing sketch that can randomly generate 500 circles.
codefeedback
Write a regular expression that validates email addresses.
codefeedback
Design a class in Python to model a hospital.
codefeedback
Find the maximum number of left and right parentheses that can be balanced for a given expression. Expression: (()()
codefeedback
Write code to iterate through a nested dictionary and return the sum of all values. dictionary = { 'level1': { 'level2a': { 'level3a': 1, 'level3b': 3 }, 'level2b': { 'level3a': 4, 'level3b': 5 } } }
codefeedback
Create a function that takes a list of numbers and identifies the sublists of numbers that add up to a given sum.
codefeedback
Create a function to parse a string that has lines of key/value pairs and return a dictionary of the values paired with the keys.
codefeedback
Create a program in Java that finds the average of a given array. int[] arr = {3, 4, 5, 6};
codefeedback
Create an algorithm that returns an array of the unique items in a given list. [1, 2, 4, 2, 5, 6, 7, 1, 4]
codefeedback
Create an algorithm to determine if two strings are rotations of each other. "abcde", "eabcd"
codefeedback
Generate a code to sort a list of floats. [4.5, 7.5, 1.5, -2.5]
codefeedback
Replace the values in the following array with its cumulative sum. arr = [1, 2, 3, 4, 5]
codefeedback
Programmatically generate a random password of length 8 that contains at least one lowercase letter, one uppercase letter, one number, and one special character.
codefeedback
How would you generate a Fibonacci sequence up to n in a list?
codefeedback
How would you calculate the distance between two points in a three-dimensional space?
codefeedback
How would you form a list from two lists by taking elements at same index from both the lists?
codefeedback
Translate the following expression into a SQL query.
codefeedback
Edit the given code snippet to reverse the elements of a list in Python.
codefeedback
Develop a regex expression to validate if a given string contains 5 numbers consecutively.
codefeedback
Use TensorFlow to build a machine learning model for predicting continuous values given a data set of temperature vs electricity consumption.
codefeedback
Generate a list of integers between a given start and end value. Start = 3 End = 10
codefeedback
Compose an algorithm to determine whether a given string contains all unique characters.
codefeedback
Using Tensorflow, set up a model to predict the classification of a handwritten digit.
codefeedback
Create an Angular2 component to display a "Hello, world!" message.
codefeedback
Write a C++ method to calculate the Fibonacci series.
codefeedback
Run a sentiment analysis on a given text. Text: "The movie was amazing!"
codefeedback
Optimize MySQL query to select the latest record in each group SELECT * FROM myTable GROUP BY type
codefeedback
Generate C code to swap two integers without using a third variable.
codefeedback
How can we obfuscate a JavaScript code to make it harder for hackers to reverse engineer it?
codefeedback
Apply K-means clustering to a 3-dimensional dataset given a certain number of clusters. Number of Clusters = 4
codefeedback
Identify the type of variable (integer, float, string) for the given value. Value: 1968
codefeedback
Construct a regular expression to detect a valid IP address in a user input.
codefeedback
Design a CRUD API using Node.js.
codefeedback
Implement a method in C# that reverses the digits of an integer.
codefeedback
Suggest a design pattern to solve the following problem A system needs to access different types of data from multiple data sources.
codefeedback
Generate a for loop to iterate over all div elements on a website and print their content.
codefeedback
Write a Java program to find all combinations of two numbers in an array that add up to a given sum. Array: [2, 7, 3, 5] Sum: 10
codefeedback
How can you access the fourth element of a linked list in Java?
codefeedback
Write an SQL query to display the average age of employees in each department.
codefeedback
Write a Cypher query to select all nodes with the label 'address'.
codefeedback
Develop a regex pattern to match email addresses.
codefeedback
Design a one-to-many relationship between two tables in SQL.
codefeedback
Write an assembly language program to calculate 2 to the power of 8.
codefeedback
Write a SQL query to select the records from the table which have the maximum value in a given column. Table Name: Student Column: Age
codefeedback
Explain how to measure the complexity of an algorithm.
codefeedback
Explain the concept of Strassen's Matrix multiplicatiom algorithm.
codefeedback
determine if two strings are anagrams or not. string1 = 'listen' string2 = 'silent'
codefeedback
Write a correct implementation of the following algorithm Binary search for an element x in a sorted array
codefeedback
Find the first common ancestor of two nodes in a binary tree Node 1: 15 Node 2: 16
codefeedback
Write a function in Java to implement a Radix Sort algorithm.
codefeedback
Write a function that takes a list of numbers and a target number. Print the numbers in the list that are closest to the target. number_list = [7, 11, 13, 14, 40] target = 16
codefeedback
Write a function to replace the Kth smallest number in integer array with 0. nums = [2, 9, 8, 11, 5] K = 3
codefeedback
Write a function that can generate all permutations of a given string. string = "ABC"
codefeedback
Deconstruct this line of Python code and explain what it does y = [x**2 for x in range(10)]
codefeedback
Irrespective of the value of the input array, always print 1111111. arr = [6,2,3,4]
codefeedback
Write code to search for a number in a sorted array.
codefeedback
Write a function to print out all possible permutations of a list of numbers. list = [1, 2, 3]
codefeedback
Create an API endpoint that takes two inputs (phone number and name) and updates contact details in the database.
codefeedback
Determine whether a given number is an armstrong number or not 153
codefeedback
Write a JavaScript statement to delete all cookies
codefeedback
Write a function to parse HTML
codefeedback
Write an SQL query to find the names of all students who have scored more than 80% marks in their exams.
codefeedback
Design a tree data structure to store employee records in an organization.
codefeedback
Create a class called "IDgenerator" that generates a list of unique random numbers between a given range.
codefeedback
Write a code snippet to find all combinations of 3 numbers in the array that sum to zero. [3, 5, -2, 1, -1, 0, 4]
codefeedback
Write a Java class that can be used to store and access a large dictionary. Large dictionary with 10000 words
codefeedback
Create a machine learning classifier that can classify the sentiment of a text. Text: This product is really bad
codefeedback
Find all substring of a string. String: "abcdefg"
codefeedback
Convert a string of numbers from one base to another. String: "101111" From Base: 2 To Base: 10
codefeedback
Write a regular expression that can detect emails.
codefeedback
Create a browser application in JavaScript that toggles a dark-mode.
codefeedback
Calculate the length of each word in a given string and store them in an array. "Hello World How Are You"
codefeedback
Write a SQL query to retrieve the details of all customers who have placed orders with status "Delivered"
codefeedback
What could be a use case of applying an algorithm such as the K-Means Clustering Algorithm?
codefeedback
Create a web scraper to collect the data from the given website. Website: https://www.example.com/
codefeedback
Implement a function that prints n asterisk characters in a row.
codefeedback
Create a function that takes a string of brackets and checks if they are correctly matched or not.
codefeedback
Explain the concept of Convolutional Neural Networks.
codefeedback
Given a string of length N, provide an algorithm to determine if there is a substring in the string that repeats itself.
codefeedback
Convert the following epoch time to a human-readable format. 1599462722
codefeedback