Answered step by step
Verified Expert Solution
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
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 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 endStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started