From b3b9634cba6aa46618750e7cbce7768028921fe7 Mon Sep 17 00:00:00 2001 From: sabine Date: Fri, 31 Aug 2018 21:16:13 -0700 Subject: [PATCH] Eureka --- .DS_Store | Bin 0 -> 6148 bytes lib/array_equals.rb | 13 ++++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..72293c9ac3258a18b8461c5310352b1da9139666 GIT binary patch literal 6148 zcmeHK!EVz)5S?vO*aRVRKx&V^AaRILLjn>)NG7C*9*_{O$^lSo*M?fSb`(2A5Q2Q+ zBj6AC6uyAZfj7GYYEpWu5L7$T?3>>V5i<#iie}|lcKNqxoTX*8 zwe?-CHJa;}E^FP^?W^sV!BH^_s<4`t!*KGPdr!jZC=z?OD6-#n811FWY`=5;QIS_+ znkN&JoW==4UOY?lxR?!#X&#rRPGASLZt2#3XLCO9_Xl0C*B>mp-u&L}Ue~)jxU*Qa z^u~?egPnupckkyP79T&`RZuvjj9e4^1z%vu^xg)OJS+0o@Nl%I35E2A5_$!SGD=oR z`ihv7B(>-%ZPP;<(PQ8(I;MCzLv5^NtW!y2)IX$hCGykRkr#ClPLQ#(5a7beIWr*J zL0>uNx~`mKz%lUuGr;GA2W9jHYm4USKx3W&z$V;AV4I(RpvMlNFIZcI2cm2$(55PR zVkmh#D4ULPU*cRS`T^vW#PEmqDes`*Re79D&B+|!I;Me&=;&N!UJ(X O0)__HI0pVI13v-h&%u5G literal 0 HcmV?d00001 diff --git a/lib/array_equals.rb b/lib/array_equals.rb index 58e8369..37168b1 100644 --- a/lib/array_equals.rb +++ b/lib/array_equals.rb @@ -1,5 +1,16 @@ # Determines if the two input arrays have the same count of elements # and the same integer values in the same exact order def array_equals(array1, array2) - raise NotImplementedError + if array1 == array2 + return true + else + return false + end + + if array1.hash.length == array2.hash.length + return true + elsif array1[0] == array2[0] + return true + end + end