Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello! This is my question from CodeWars for my own personal coding practice. I have been stuck for 2 hours, can someone help me figure

image text in transcribedHello! This is my question from CodeWars for my own personal coding practice. I have been stuck for 2 hours, can someone help me figure this out? new to programming and I tried 10 different things but I pass all tests except the 0.5. Literally passes every test( huge number, negative, random, shuffled, long array) besides the 'basic test' due to that 1 issue and I can not seem to figure it out. Thank you for your knowledge.

LANGUAGE IS RUBY

Solution This is the first kata in series: 1. Find the unique number (this kata) Sample Tests 2. Find the unique string 3. Find The Unique it "should test for something" do Test.assert_equals(find_uniq ([1,1,1,1,0]), 0 ) Test.assert_equals(find_uniq ([1,1,1,2,1,1]),2); Test.assert_equals(find_uniq ([0,0,0.55,0,0]),0.55); end end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learn Mysql The Easy Way A Beginner Friendly Guide

Authors: Kiet Huynh

1st Edition

B0CNY7143T, 979-8869761545

More Books

Students also viewed these Databases questions