IBM OA 面经 2024:Software Engineer Backend 笔试题全解

💼 面试代面 / OA辅助 / VO辅助

✅ 北美科技大厂面试 · 一对一真人代面

微信: leetcode-king | Telegram: @ayinterview

📚 更多面试资源:

关于我们 – 代面服务介绍

Blog – 更多面试攻略

更多资源与服务

想要了解更多编程面试技巧,或者需要专业的面试辅导OA代做简历润色等服务?我们提供全方位的求职面试支持,帮助您在大厂面试真题系统设计面试算法面试中脱颖而出,轻松拿到心仪的 offer!无论您是留学生、刚踏入职场的新人,还是需要代码优化建议的开发者,我们的团队由ACM奖牌得主、大厂资深 TLM 及经验丰富的行业老兵组成,确保为您提供最专业的指导。

扫描下方二维码,添加我们的微信,获取更多服务:

微信二维码

关键词:

  • 面试代面
  • 代码代写
  • OA代做
  • 面试技巧
  • 面试经验分享
  • 职业规划
  • 编程练习

让我们帮助您在技术面试中脱颖而出,实现职业上的飞跃!

Question 1: Minimum Cost to Adjust Pixel Intensities

Keywords: image processing, dynamic programming, matrix manipulation

Problem Statement:

A grid-like representation of an image is divided into

n rows and m columns, with each cell containing pixel intensity values. The aim is to improve the visibility of specific objects in the image.

The goal is to adjust the intensity of each pixel to ensure that no pixel in the previous rows (within the same column) has a higher or equal intensity than the given pixel. Each increase in pixel intensity has a cost of one unit per unit of increase.

Solution Approach:

  1. Greedy Approach: Traverse the matrix from top to bottom. For each row, ensure that the pixel intensity is strictly greater than the pixel in the row above (in the same column). If the condition is not met, increase the pixel intensity, and add the cost of this increase.
  2. Cost Calculation: Keep track of the total cost as we adjust the intensities to meet the requirements.

Sample Code:

def getMinimumCost(pixelIntensity): n = len(pixelIntensity) m = len(pixelIntensity[0]) total_cost = 0 for col in range(m): for row in range(1, n): if pixelIntensity[row][col] <= pixelIntensity[row - 1][col]: increment = pixelIntensity[row - 1][col] - pixelIntensity[row][col] + 1 total_cost += increment pixelIntensity[row][col] += increment return total_cost

Example usage:

pixelIntensity = [ [2, 4, 6], [4, 2, 7], [6, 4, 7] ] print(getMinimumCost(pixelIntensity)) # Output: 6

Question 2: SQL Grade Assignment

Keywords: SQL, query, conditional logic

Problem Statement:

You are given a table named

students that contains the total marks of students in a class. The teacher wants to assign grades to the students based on the following criteria:

  • Marks > 90 -> Grade A+
  • Marks > 70 -> Grade A
  • Marks > 50 -> Grade B
  • Marks >= 40 -> Grade C
  • Marks < 40 -> Fail

Write an SQL query to return the ID, name, marks, and grade for each student.

Sample SQL Query:

SELECT id, name, marks, CASE WHEN marks > 90 THEN 'A+' WHEN marks > 70 THEN 'A' WHEN marks > 50 THEN 'B' WHEN marks >= 40 THEN 'C' ELSE 'Fail' END AS grade FROM students;



🎯 面试代面 / OA辅助 — 前大厂工程师团队帮你上岸

正在为技术面试发愁?我们的北美大厂工程师团队提供专业辅导和辅助服务:

  • OA代做 — HackerRank / CodeSignal / LeetCode 等全平台覆盖,保证通过
  • 视频代面 — Google / Meta / Amazon 等主流平台,真实面试官在线
  • 模拟面试 — 1对1真实场景还原,详细反馈与改进建议
  • 简历优化 — 北美大厂HR背景,帮你打造高通过率简历

📱 微信: leetcode-king(添加请备注”面试”,回复更快)

💬 Telegram: @ayinterview(24小时在线)

⚡ 紧急面试可加急,30分钟内安排工程师对接

🚀 需要面试辅导?立即联系我们

✅ 前大厂工程师团队 · 一对一辅导 · 真实案例 · 保密协议

微信: leetcode-king | Telegram: @ayinterview

💼 北美科技大厂面试 · 面试代面 · OA辅助 · VO辅助