describe how to implement HashMap and how to implement ArrayList
Round 1: Coder pad -> Simple High Five question with some tweaks and some LR questions.
Round 2: Code pad -> Hash Map question using Generics. Now, this was tricky as you have to code real time.
Round 3, Super Day : This had three rounds 45 mins each without a break1: Round 1 : They asked me about SQL, basic queries of Unique and also to get the largest element. 2 Sum, 3 Sum, 4 Sum problem.
2: Round 2: SDLC principles : Now, this was mostly a summary of my experience and how one will get to production design, unit testing and overall working of the whole software. I felt it was positive, but I guess I failed in answering some of the questions for database related unit testing. Mochito was the answer.
3: Round 3: System design round, The interviewer shared a document which had a futures problem and how I would reduce the total transactions over the system to save company money. Plus some leadership principles and one question about my approach inusing React and Angular JS.
Received a mail from HR that I was not selected.
[Goldman Sachs Top 50 LeetCode Questions] Q7. High Five
Andrew H., Front Office Developer
Feb 25, 2020·2 min read
If you are preparing a coding interview for GS, this series surely helps you. I have coded the most optimized solutions of 50 LeetCode questions tagged with Goldman Sachs.
Goal:
get average of top 5 scores of each student & arrange in order of each id
As if you want to put the score to be together with the stored scores based on the id, you have to search the index using O(k) time complexity, k is no. of students
In total, the time complexity is O(n k), n is no.of items
Second, TreeMap can be a choice.
adding need O(log k) time complexity, k is the size of the map, which means no. of students
In total, as you have to add n items, the time complexity is O(n log k), n is no. of items.
Third, an array can be a choice.
searching and then need is O(1) time complexity as the id of student equal the index of the array
In total, the time complexity is O(n), n is no. of items
Across them, the third choice has the fastest performance, which is linear speed.
If you are preparing a coding interview for GS, this series surely helps you. I have coded the most optimized solutions of 50 LeetCode questions tagged with Goldman Sachs.
if given 10x10 board, what is the probability that the knight is still on board after the 1st iteration?
Let’s assume the starting point is at (0,0). There is a probability of 0.125 to go to (2,1) and the same probability to go to (1,2) to keep it still on the board. All other directions give a 0 probability. The probability is still on board = 0.125*2= …
If you are preparing a coding interview for GS, this series surely helps you. I have coded the most optimized solutions of 50 LeetCode questions tagged with Goldman Sachs.
Remove Comments - LeetCode
Given a C++ program, remove comments from it. The program source is an array where source[i] is the i-th line of the…
If you are preparing a coding interview for GS, this series surely helps you. I have coded the most optimized solutions of 50 LeetCode questions tagged with Goldman Sachs.
Game of Life - LeetCode
According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by…
If you are preparing a coding interview for GS, this series surely helps you. I have coded the most optimized solutions of 50 LeetCode questions tagged with Goldman Sachs.
Climbing Stairs - LeetCode
You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In…
If you are preparing a coding interview for GS, this series surely helps you. I have coded the most optimized solutions of 50 LeetCode questions tagged with Goldman Sachs.
Minimum Size Subarray Sum - LeetCode
Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of…
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?