Given an array of unique non-negative integers, {A1,…,An}, and a positive integer, X, write a function that finds all pairs of numbers in the array that sum to X”. You are given an integer array nums sorted in ascending order (with distinct values), and an integer target. Suppose that nums is rotated at some pivot unknown to you beforehand (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]).” Take a singly-linked list, and reorder in such a way that the first element points to the last element, second element points to second-to-last element, and so on.
Software Interview Questions
551,145 software interview questions shared by candidates
Getting the min from a stack in O(1) time
How to write an evaluator for a string like "(1+3 * ( 5 / 4)) and get a numeric result.
How would you sort an array if you had infinite RAM? Infinite memory?
Give an example of real world scenario where you see inheritance?
Check if a string which represents a math exercise is balanced in terms of parentheses Remove spaces from a string
Given a database, where we know some portion of data (e.g. say 20%) is accessed more than the other portion of the database by the client. We have a frontend that client requests data from. Design a data structure that will increase the efficiency of access of objects. And we know that we can only hold on to n elements in memory.
Given a big image, how will you pan and zoom into the image in a way so as to focus on the important parts ot the image.
Connect Four is a game where two players take turns dropping their color discs into a vertically suspended grid. The game ends when a player adds a disc to the playing grid that connects four discs of their color. The connected discs can be in a horizontal, vertical or diagonal line. Write a function to be called after every turn that returns true if the game is over (and false otherwise).
You have 16 race horses and a racetrack which only fits 4 horses at one time. Find the top 4 horses in the fewest number of races.
Viewing 1911 - 1920 interview questions