We are given an array A of integers, we have to find an integer k that is not present in A. One assumption that is given is that the integers are 32 bit signed integers.
One thing that can be done is to find the max or min element of the array and return max+1 or min-1 resp. But this solution fails when the extremes are present in the array. Also can anyone tell how the assumption given in the ques is helpful? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/PX7wDAhOai4J. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.