7 kyu

Find the Missing Number

949 of 8,198blu12758

Description:

This question is a variation on the Arithmetic Progression kata


The following was a question that I received during a technical interview for an entry level software developer position. I thought I'd post it here so that everyone could give it a go:

You are given an unsorted array containing all the integers from 0 to 100 inclusively. However, one number is missing. Write a function to find and return this number. What are the time and space complexities of your solution?

Algorithms

Stats:

CreatedOct 6, 2016
PublishedOct 6, 2016
Warriors Trained12277
Total Skips141
Total Code Submissions28249
Total Times Completed8198
C++ Completions949
Clojure Completions100
Haskell Completions168
Python Completions3456
Ruby Completions267
JavaScript Completions3004
C Completions162
COBOL Completions11
Elixir Completions37
C# Completions354
Julia Completions11
Lua Completions23
Java Completions74
Total Stars115
% of votes with a positive feedback rating93% of 962
Total "Very Satisfied" Votes833
Total "Somewhat Satisfied" Votes117
Total "Not Satisfied" Votes12
Total Rank Assessments8
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • blu12758 Avatar
  • Unnamed Avatar
  • anter69 Avatar
  • kazk Avatar
  • user5036852 Avatar
  • Blind4Basics Avatar
  • Madjosz Avatar
  • H1ro Avatar
  • rowcased Avatar
  • FArekkusu Avatar
  • a.kozhanov Avatar
  • hobovsky Avatar
  • hakr14 Avatar
  • trashy_incel Avatar
  • StephenDonovan1 Avatar
  • akar-0 Avatar
  • farhanaditya Avatar
  • rafawbraga Avatar
  • suyundukov Avatar
  • metatable Avatar
  • PetitLu117 Avatar
Ad