Stack Bash - Master data structures and algorithms

Same value

Easy
You're checking whether two values match. The draft uses is. That looks fine on 1 and 1.
Write a function that returns True if two values are equal, and False otherwise.
For example
same_value(1, 1)
should return True.
And
same_value([1, 2], [1, 2])
should also return True. Those are two lists with the same items, not the same object.
The starter uses is. Run it first.

Try it first

Solution

10 Essential DSA in the AI era Coding Interview Problems

Master DSA in the AI era by trying the coding challenges below.
  1. 1.Count occurrencesEasy
  2. 2.Fix the default listEasy
  3. 3.Move zeroesEasy
  4. 4.Is subsequenceEasy
  5. 5.First unique characterEasy
  6. 6.Group anagramsMedium
  7. 7.Climb stairsEasy
  8. 8.Find the targetEasy
  9. 9.Drop zero countsEasy
  10. 10.Same valueEasy