Given a string of Rs and Gs, design an algorithm to produce a string with Rs in the front and Gs after that. The number of flips from Rs to Gs or otherwise should be minimum. The number of Rs and Gs in the end need not be same as that in the beginning, however the length of the entire string should be the same.
Software Development Engineer Interview Questions
33,158 software development engineer interview questions shared by candidates
Write a function that takes in an array and repeats an integer that appears the most.
Check if tic-tac-toe has a winner
Write a program to determine if a character array is an anagram of another character array.
I was shown three programs. Each solving the same problem and was asked to analyze them and suggest which one is the best and why.
1. Tell me about your experience when you make decision without the approval of your mentor. 2. Park lot design.
Given an array of integers, all but one of which appears an even number of times, find the one integer which appears an odd number of times. Upon completion, asked to improve the algorithm in terms of both time and space, eventually asked to do it in O(n) time and constant space.
2. You have an array (size is not known) and whose elements are having the values from 0-> 99. Find out the three largest elements in that array and return those.
Find the numbers in an array that appear an odd number of times.
Given the word "HEAD" and the word "TAIL," write code and/or describe using computer science algorithms how you would transform from the word HEAD to the word TAIL. Each change must be by only one letter, you cannot change the letter in a given position twice, and each new word must be a valid word.
Viewing 131 - 140 interview questions