Google Software Engineer New Graduate

Status: New grad, MS CS University of Maryland, Baltimore County
Position: Software Engineer, New Grad
Location: Multiple Locations

Coding Round

Variation of Next Closest Time - https://leetcode.com/problems/next-closest-time/description/ : The question asked to solve this without re-using the digits.
Similar to K-Empty Slots - https://leetcode.com/problems/k-empty-slots/description/
Technical Phone Screen - I

Remove Elements from a Doubly-Linked List
Return if there exists a path from root to leaf equal to a given sum - https://leetcode.com/problems/path-sum/
Experience
The coding round was easy, Leetcode Explore with Premium helped mostly.

The interviewer for the phone round was very nice and made sure I was at ease. She was constantly discussing my approach. The only hiccup in the interview was for the Path sum problem, where the interviewer said my code won’t work, and made me change it. Later, I checked out both codes on Leetcode, mine ran faster (1ms) than the one she suggested (3ms). Otherwise, the experience was pleasant.

\\ My code : 

class Solution {
    
    public static boolean subfunc(TreeNode root, int sum) {
        if(root == null) {
            return false;
        }
        if(root.left==null && root.right==null) {
            return root.val == sum;
        }
        int remainingSum = sum - root.val;
        return subfunc(root.left,remainingSum)|| subfunc(root.right,remainingSum);
    }
    
    
    public boolean hasPathSum(TreeNode root, int sum) {
        return subfunc(root,sum);
    }
}

\\---------------------------------------------------
\\Her code : 

class Solution {
    
boolean subfunc(TreeNode root, int sum) {
	if(root == null) {
		return false;
	}
	if(root.left==null && root.right==null) {
		return root.val == sum;
	}
	int remainingSum = sum - root.val;
	boolean temp = false;
	temp = temp || subfunc(root.left,remainingSum);
	temp = temp || subfunc(root.right,remainingSum);
	return temp;
}
   
	public boolean hasPathSum(TreeNode root, int sum) {
        return subfunc(root,sum);
    }
}