int getCount(int[] arr, int num)
Software Development Interview Questions
36,967 software development interview questions shared by candidates
Write a function that takes an input string, consisting of several words separated by spaces, and print out each word reversed, keeping the same order within the string.
How would you reverse the words in a string?
Recursively reverse a singly linked list.
write a boolean method to find out if a number is a power of 2
1- Given an array of integers, positive and negative. find an interval in that array, whose elements constitutes the maximum sum
Given an integer write a function that converts the input into a linkedList where each node corresponds to a number of the integer. Eg: 25697 == 2 -> 5 -> 6 -> 9 -> 7 Then write a function that takes 2 linkedList, add the corresponding integers and return a third list with the result.
Given a string, find whether it has any permutation of another string. Need to be efficient
Design a Data Structure SpecialStack that supports all the stack operations like push(), pop(), isEmpty(), isFull() and an additional operation getMin() which should return minimum element from the SpecialStack. All these operations of SpecialStack must be O(1). To implement SpecialStack, you should only use standard Stack data structure and no other data structure like arrays, list, etc.
1. if input is n=7 then print this pattern. Program should be dynamic. * ** *** **** *** ** * 2. One array have many numeric values arr[] = {2,3,4,5,2,5,9,45,23} output arr[] = {2,3,4,5,9,45,23}. Means remove duplicate values from array and store. 3. if n = 5 then print this pattern. * - - - - * * * - - - * * - * - - * * - - * - * * - - - * * 4. They ask me in second round -->if arr[] = "My _ _ _ _Name _ _ _ _ _ is _ _ _ _ _ _ _ _ _ _ xyz". In output there should be only one space between word like arr[] = "My _ Name _ is _ xyz". 5. Take input like 3,5,4,6 separately and output should one numeric value like 3546, for 4,5--> 45.
Viewing 241 - 250 interview questions