문제를 풀었습니다


Increasing sub-sequence (Level 1)
Given a vector, v, of real numbers, return a positive integer, n, representing the longest contiguous increasing sub-sequence co...

3개월 전

문제를 풀었습니다


Modulo with 5

3개월 전

문제를 풀었습니다


Sky full of stars - 03
draw the following pattern with asterisks. For example, for n=6 '************' '***** *****' '**** ****' ...

3개월 전

문제를 풀었습니다


nxn matrix with elements from 1:n^2
really simple once you see what the matrix is supposed to look like. i appreciate what seems to be a clever approach to solving ...

4개월 전

문제를 풀었습니다


Basic Matlab Operation Bonanza
Given a horizontal array of numbers, perform the following operations, in order: transpose, flip matrix horizontally, flip matri...

4개월 전

문제를 풀었습니다


Find the gcm of n given values
Create a function that given n integer values greater than zero, finds the two numbers with the greatest common divisor and retu...

4개월 전

문제를 풀었습니다


Sort vector by number of prime factors of each element
Sort a given array based on how many prime factors each term has. Sort from least to greatest and output original values. Ex: ...

5개월 전

문제를 풀었습니다


Memory Map File: Access and Update
Challenge is to read data from a memory map file and also update the file. Memory Mapping allows placing large static arrays ...

5개월 전

문제를 풀었습니다


Get the variable value from a string and generate sum
Get the variable value from a string. Example. x = 'A=10' y = 'B=20' Result = (x+y) Result = 30

5개월 전

문제를 풀었습니다


Remove Duplicates
Remove duplicates from the vector of integers and display in sorted order

5개월 전

문제를 풀었습니다


Leonardo primes
Leonardo numbers are defined by following recurrence relation: Leonard prime is Leonardo number which is also prime (see ...

5개월 전

문제를 풀었습니다


Draw a triangle of ones
For any given n, return a matrix that includes a triangle of ones of height n: Example n = 3 output = [0,0,1,0,0 ...

5개월 전

문제를 풀었습니다


Return longest string in 1-D array of strings
Find the longest string in an array of strings. Return an empty string if the initial array is empty. If there are multiple stri...

5개월 전

문제를 풀었습니다


Create a column vector of n elements between a and b (both included)
Given lower limit a and an upper limit b, create a column vector of n elements inclusive of a and b. For example: a = 1, b = 4,...

5개월 전

문제를 풀었습니다


Is the number of 1s in a binary integer odd or even?
Your function should turn the input integers into binary form and count the number of 1s in the binary. If the number is odd, re...

5개월 전

문제를 풀었습니다


Find the moving-average of the elements of a vector
Example Input vector: [1 2 3 4] output vector: 1st element=1/1, 2nd element=(1+2)/2, 3rd element=(1+2+3)/3, 4th element=(1+2...

5개월 전

문제를 풀었습니다


Determine the winner of a goofy golf tournament
My brother and father were playing golf one day, and they caught up to a group that was part of a tournament. The group members ...

5개월 전

문제를 풀었습니다


Luhn's Algorithm
Luhn's Algorithm is used as a checksum for credit card numbers or similar identifiers. It can detect single-digit changes and sw...

5개월 전

문제를 풀었습니다


Vector slither sort!
Sort a numeric vector in the following format: [largest value, smallest value, second largest value, second smallest value, etc...

5개월 전

문제를 풀었습니다


Sum of 2 numbers in array
Given an array and a target sum, return true if any 2 numbers in the array sum up to the given target sum. Both numbers cannot h...

5개월 전

문제를 풀었습니다


Return the middle element of an NxN square matrix where N is odd
Let's say you are given an NxN square matrix where N is always going to be an odd number: x = [ 1 2 3 4 5 6 7 8 ...

5개월 전

문제를 풀었습니다


apply zero padding to a matrix

5개월 전

문제를 풀었습니다


Find the magnetic field around the wire

5개월 전

문제를 풀었습니다


Check if a year is a leap year or not
Return 1 if a given year is a leap year or 0 if it is not

5개월 전

문제를 풀었습니다


Draw a fancy '7' in a zero matrix!
Given a x-by-x matrix filled with zeros (x is odd and > 3). Use 7s to draw a number 7 into it! Like this: x = 5, y = 7 7 7 7 7...

5개월 전

문제를 풀었습니다


Parsing Expressions - Binary Arithmetic Operators I
Parse and evaluate expressions like these: '1 + 2' '51 - 78' '42 * 9' The only operators are +, -, *. Both argu...

5개월 전

문제를 풀었습니다


Find the nth composite number.
Everyone heard about the nth prime number. Let's try to find out the nth composite. For example , 1 is the first composite, 10 i...

5개월 전

문제를 풀었습니다


Right shift an array n times with constant space.
Right shift an array n times with constant space, that is, no extra array can be used. Right shift operation: Last element com...

5개월 전

문제를 풀었습니다


The length of the equal sides of an isoceles triangle is 'a'.For all the possible (integer) values of the remaining side,find the associated angles between the two equal sides.
the remaining side may have many possible values.only assume integer ones for simplicity.

5개월 전

더 보기