What do you want to save?
Add Code snippet
New code examples
-
Python 2022-01-30 18:20:48
first_last6
# first_last6 - https://codingbat.com/prob/p181624 # Given an array of ints, return True if 6 appears as either the first or last element in the array. The array will be length 1 or more. # first_last6([1, 2, 6]) = True # first_last6([6, 1, 2, 3]) = True ... Add solution -
C++ 2021-10-25 12:11:17
how to find all permutations of n distinct integers in c++
#include <bits/stdc++.h> using namespace std; //Display elements of the array void display(vector<int> a, int n){ for(int i=0;i<n;i++) cout << a[i] << " "; cout << endl; } int main() { //Obtaining ... Add solution -
-
Java 2021-10-11 12:15:02
convert hashset to int array java
import java.util.Arrays; import java.util.Set; import java.util.HashSet; class Main { // Program to convert set of integer to array of int in Java public static void main(String args[]) &nb... Add solution -
Other 2021-09-16 12:48:02
get_products_of_all_ints_except_at_index
You have an array of integers, and for each index you want to find the product of every integer except the integer at that index.Write a function get_products_of_all_ints_except_at_index() that takes an array of integers and returns an array of the produc... Add solution