Goldman Sachs Interview Questions
- 0of 0 votes
AnswersPuzzle : There will be two sticks, if you burn each sticks from one side both will burn for an hour. You don't have any watch or stop watch, How you will measure 1 n half our and 45 min?
- PCB March 05, 2013 in India| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer - 1of 1 vote
AnswersFind wether there is a loop in a given liked list or no?
- PCB March 05, 2013 in India
I solved it using two pointers. But they were not satisfied as I knew this solution before. They wanted me to solve using Single pointer.| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer Algorithm - 0of 0 votes
AnswersPrint 'n' elements of fibonacci series.
- PCB March 05, 2013 in Indiapublic int fibonacci(int n) { if ((n == 1) || (n==2)) { System.out.print("\t" + 1); return 1; } int temp = fibonacci (n-1) + fibonacci (n-2); System.out.println("\t" + temp); return temp;
| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer Algorithm - 1of 1 vote
AnswersYou have gine n points with x and y cordinates (2 D), and you have to print how many of them are capable of forming a square and for each square print the points that are forming the square.
- pandu.vdp January 30, 2013 in India| Report Duplicate | Flag | PURGE
Goldman Sachs Financial Software Developer Algorithm - 2of 4 votes
AnswersSuppose u have a square matrix of 0s and 1s only ... find the longest path of 1s available in the matrix and return that .. you can only move right and down ... For e.g.
- Messiah January 20, 2013 in India
0 0 0 1 1
1 1 1 0 1
0 1 1 1 0
0 0 1 0 0
1 1 1 1 1| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Algorithm - 0of 0 votes
AnswersDesign a data structure for LRU where replacement can take up to O(log n ) time, searching take O(log n) time, inserting will also take only O(log n) time(Big question, I was given some time(around 5 to 10 minute) to think) ?
- sonesh January 01, 2013 in India for Strategies Group| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Operating System - 0of 0 votes
AnswersWhat is virtual memory, how operating system uses it ?
- sonesh January 01, 2013 in India for Strategies Group| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Operating System - 1of 1 vote
AnswersHow can we reduce search time in linked list(reduce time complexity to O(log n), it is not given but I gave my answer with O(log n) complexity) ?
- sonesh January 01, 2013 in India for Strategies Group| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Algorithm Linked Lists - 0of 0 votes
AnswerDraw a simple model of a Program Control Block ?, Now write a simple code and show all the sections in the code (means when this code will run then which section of the code go where in PCB) ?
- sonesh January 01, 2013 in India for Strategies Group| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Application / UI Design - 0of 0 votes
AnswersPrint a binary tree without using recursion(inorder print) ?
- sonesh January 01, 2013 in India for Strategies Group| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Algorithm - 0of 0 votes
AnswersHow can I give new implementation to methods in String.
- Andi November 22, 2012 in India
For example: I need to give new implementation to concat method, which concats two string and convert to uppercase.
I answered that, i create new custom class and create a method concat and implement it as the way interviewer want, but he asked that he want to do for all the methods in String, so writing new implementation for a methods is not a feasible solution.| Report Duplicate | Flag | PURGE
Goldman Sachs Applications Developer - 0of 0 votes
AnswersFor a given array size is know but elements using index is not accessible. 2 given functions are below:
- singhSahab October 29, 2012 in United States
1. getIndexOfNthLargest(int n) // returns the index of nth largest number. Like for n=1 the index of largest element will be returned, for n=2 the index of 2nd largest number will be returned.
2. reverseArray(int i) // reverse the elements of the array from index 0 to i
How to sort the array in place?| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer Algorithm - 0of 0 votes
AnswersThere is a stream of integers coming in. And you have to store top n elements. What data structures you would use?
- Luck Dude October 17, 2012 in United States
1, The solution should be efficient such that n can be millions of integers.
2, Should be able to display integers in descending order. Sorting should not be done whenever requested.
3, Insert, Delete should be as optimal as possible.| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Data Structures - 0of 0 votes
Answersyou have array of characters with some spaces.. best way to take out only words..
- manikesh.verma July 16, 2012 in India
input ==> a,a,b, , , c, , ,d,e
output ==> aabcde -- all spaces are removed..
best way to do?| Report Duplicate | Flag | PURGE
Goldman Sachs Financial Software Developer - -1of 1 vote
AnswersWhat is the main use of interface ? Provide a real time example that shows it
- Shobhit July 11, 2012 in United States| Report Duplicate | Flag | PURGE
Goldman Sachs Java - 0of 0 votes
AnswersWhat is the importance of overriding in java ? Give any real life example . How is it increasing the code reusability and robustness .? Cant we create new function instead of override ? What difference will it make ?
- Shobhit July 11, 2012 in United States| Report Duplicate | Flag | PURGE
Goldman Sachs Java - 0of 0 votes
Answersfind a^b using optimal algorithm.... [ no use of inbuilt functions?
- sachinism June 16, 2012 in India| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Algorithm - 0of 0 votes
AnswersHow to find 4 largest elements of an given array of length n. Best possible option ??
- sachinism June 16, 2012 in India| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWhat is the next number in the series
- DashDash May 12, 2012 in India
2,4,8,16,24...| Report Duplicate | Flag | PURGE
Goldman Sachs Applications Developer Brain Teasers - 0of 0 votes
AnswersWrite a Program
- axoaxo March 19, 2012 in United States
You have an array that stores million integers. you replace one integer of the array. How will you find that integer. Array is not sorted. Time complexity should be as small as possible.| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer - 0of 0 votes
AnswersWrite a Program
- axoaxo March 19, 2012 in United States
Reverse a String. Length of String is very long. Do not use in-built reverse method. Reversal method should be time efficient. Calculate the complexity.| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Java - 0of 0 votes
AnswersWrite a Program
- axoaxo March 19, 2012 in United States
You will create an employee class with the following properties:ID (int), FName(string), LName(string). (Functionality) to track an employee's manager and subordinates. method that displays the names of all subordinates for a given employee.| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Java - 0of 0 votes
AnswersWhy do you need Synchronization and how it works? Working of Implicit and explicit wait() and notify
- axoaxo March 16, 2012 in United States| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Java - 0of 0 votes
Answersworking of TCP/IP proctocol
- axoaxo March 16, 2012 in United States| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Networking / Web / Internet - 0of 0 votes
AnswersCount number of higher bits(1) in an integer alongwith its complexity? improvise it
- axoaxo March 16, 2012 in United States| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Coding - 0of 0 votes
Answersstatic synchronized method 1()
- axoaxo March 16, 2012 in United States
{
counter++;
}
synchronized method 2()
{
counter++;
}
use only one counter variable to count the number of method calls to method 1 and method 2?| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Coding - 0of 0 votes
AnswersWhat is Height balanced tree ?
- lipun4u November 22, 2011 in India
Difference between Red Black Tree and AVL Tree ?| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Data Structures - 0of 0 votes
AnswersThere are two arrays.
- lipun4u November 22, 2011 in India
int arr1[5] = { 3, 5, 2, 5, 2}
int arr2[5] = { 2, 3, 5, 5, 2}
The arrays will be called similar if they contain same number of elements equally.
Write the pseudo code to check this ?
I was not allowed to use sorting and hashtable.| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven a 2D array which has elements sorted both row-wise and column wise, find an efficient way to search a given key.
- Avinash October 15, 2011 in India
Ex: a1 a2 a3 a4
b1 b2 b3 b4
c1 c2 c3 c4
a1<a2<a3<a4 (for all rows)
a1<b1<c1 (for all columns)| Report Duplicate | Flag | PURGE
Amazon Goldman Sachs Software Engineer / Developer Applications Developer Arrays C++