Pep&Joss Interview Questions and Answers
Q1. Write a program to mirror the pixel in a screen matrix of 24 bit pixels
Program to mirror the pixel in a screen matrix of 24 bit pixels
Create a 2D array to represent the screen matrix of pixels
Iterate through each row and swap the pixels from left to right
Ensure to handle the 24 bit pixels properly for mirroring
Example: [[255, 0, 0], [0, 255, 0], [0, 0, 255]] -> [[0, 0, 255], [0, 255, 0], [255, 0, 0]]
Q2. what are trees and binary search
Trees are hierarchical data structures with nodes connected by edges. Binary search is a search algorithm that finds the position of a target value within a sorted array.
Trees are made up of nodes connected by edges, with a root node at the top and leaf nodes at the bottom.
Binary search is a divide and conquer algorithm that compares the target value to the middle element of a sorted array.
Binary search is efficient for searching in sorted arrays as it eliminates half of the ...read more
Q3. What is the max sub array?
Max sub array refers to the contiguous subarray within an array that has the largest sum of elements.
Max sub array problem is a common algorithmic problem in computer science.
It involves finding the subarray with the largest sum of elements.
Example: Given array [1, -2, 3, 4, -1, 2, 1, -5, 4], the max sub array is [3, 4, -1, 2, 1] with a sum of 9.
Q4. dp questions - longest increasing subsequence
Find the longest increasing subsequence in an array.
Use dynamic programming to solve this problem.
Iterate through the array and keep track of the longest increasing subsequence ending at each index.
Return the maximum length found.
Q5. grapg question - detect a cycle
Detecting a cycle in a graph using depth-first search or Floyd's cycle detection algorithm.
Use depth-first search to detect a cycle in a graph by keeping track of visited nodes and checking for back edges.
Alternatively, use Floyd's cycle detection algorithm for detecting a cycle in a linked list or graph.
Example: For a graph with nodes A, B, C, D and edges (A->B, B->C, C->D, D->A), a cycle is detected when visiting node A again.
Example: For a linked list with nodes 1, 2, 3, 4...read more
Q6. what is software testing.
Software testing is the process of evaluating a software application to ensure it meets specified requirements and functions correctly.
Identifying defects or bugs in the software
Verifying that the software meets functional and non-functional requirements
Ensuring the software is user-friendly and meets user expectations
Types of testing include unit testing, integration testing, system testing, and acceptance testing
Q7. what are graphs
Graphs are data structures that consist of nodes (vertices) connected by edges (links).
Graphs can be directed or undirected.
Nodes can have attributes or properties.
Edges can have weights or labels.
Examples of graphs include social networks, road networks, and organizational hierarchies.
More about working at Google
Interview Process at Pep&Joss
Top Softwaretest Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month