Workday Coding Interview Questions
100 Workday coding interview problems with full optimal solutions — 31 easy, 55 medium, 14 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Workday interviewer values, and a FAQ section.
Showing 31 problems of 100
- #24mediumsometimes asked
24. Rotate Array
Rotate an array to the right by k steps. Workday uses this to test in-place transformation discipline — same shape as shifting a payroll cycle's days when a holiday lands mid-period.
- #33mediumsometimes asked
33. Longest Palindromic Substring
Find the longest palindromic substring of a given string. Workday uses this as a DP vs expand-around-center decision point — both are valid; choosing the right one is the test.
- #34mediumsometimes asked
34. Container With Most Water
Given an array of heights, find two lines that hold the most water. Workday uses this for two-pointer convergence reasoning — same shape as maximizing fiscal-coverage between two timeline anchors.
- #36mediumsometimes asked
36. Letter Combinations of a Phone Number
Given a string of digits 2-9, return all letter combinations the digits could represent. Workday uses this for backtracking fluency — the same shape as enumerating valid permission combinations across role tiers.
- #37mediumsometimes asked
37. Remove Nth Node From End of List
Given the head of a linked list, remove the nth node from the end. Workday uses this for two-pointer-with-gap fluency — pointer hygiene mistakes show up immediately.
- #38mediumsometimes asked
38. Generate Parentheses
Generate all valid parenthesis strings of n pairs. Workday uses this for backtracking + pruning — same shape as enumerating valid approval-chain templates.
- #39mediumrarely asked
39. Swap Nodes in Pairs
Swap every two adjacent nodes in a linked list. Workday uses this for fine pointer surgery — the same wrangling needed to merge adjacent payroll segments without losing the chain.
- #40mediumrarely asked
40. Next Permutation
Rearrange numbers into the next lexicographically greater permutation. Workday uses this to test array-manipulation discipline — same pattern as cycling shift-assignment rotations.
- #42mediumsometimes asked
42. Find First and Last Position of Element in Sorted Array
Given a sorted array and a target, find the first and last index of the target. Workday uses this to test binary-search variants — same pattern as finding the first and last shift assigned to an employee within a sorted timeline.
- #43mediumsometimes asked
43. Valid Sudoku
Determine if a 9x9 Sudoku board is valid. Workday uses this for multi-dimensional constraint checks — same shape as validating that role assignments don't conflict across departments, locations, and time bands.
- #44mediumsometimes asked
44. Combination Sum
Find all unique combinations of candidates (reusable) summing to target. Workday uses this for backtracking with reuse — same shape as enumerating ways to allocate a fixed payroll budget across recurring expense categories.
- #45mediumsometimes asked
45. Permutations
Generate all permutations of an array of distinct integers. Workday uses this as the canonical backtracking baseline — same shape as enumerating role-rotation schedules.
- #46mediumsometimes asked
46. Rotate Image
Rotate an n x n 2D matrix by 90 degrees clockwise in place. Workday uses this for matrix-manipulation discipline — same shape as transposing a payroll-period attendance grid.
- #48mediumsometimes asked
48. Spiral Matrix
Return all elements of a matrix in spiral order. Workday uses this to test boundary-shrinking discipline — same shape as walking the perimeter of a fiscal calendar grid before drilling inward.
- #51mediumsometimes asked
51. Unique Paths
Count the number of unique paths from top-left to bottom-right of an m x n grid, moving only right or down. Workday uses this as a 2D DP intro — same shape as counting org-chart promotion paths through ranks.
- #52mediumsometimes asked
52. Minimum Path Sum
Find the minimum-sum path from top-left to bottom-right of a grid moving only right or down. Workday uses this for DP-on-grids fluency — same shape as finding the lowest-cost approval chain through a multi-tier authorization graph.
- #53mediumrarely asked
53. Simplify Path
Simplify a Unix-style absolute path. Workday uses this as a stack-on-strings pattern — same shape as resolving nested cost-center inheritance chains.
- #55mediumsometimes asked
55. Set Matrix Zeroes
If an element is 0, set its entire row and column to 0 in place. Workday uses this for in-place matrix updates with marker tricks — same shape as cascading deactivation of a department in a 2D allocation grid.
- #56mediumsometimes asked
56. Sort Colors
Sort an array of 0s, 1s, and 2s in one pass. Workday uses this for Dutch-national-flag fluency — same shape as bucketing employees into three pay-grade tiers in one pass.
- #58mediumsometimes asked
58. Subsets
Return all possible subsets of a set of distinct integers. Workday uses this for power-set generation — same shape as enumerating all possible permission-flag combinations in an RBAC role.
- #60mediumsometimes asked
60. Decode Ways
Count the number of ways a digit string can be decoded as letters A-Z (1=A, 26=Z). Workday uses this for DP with constraint-checking — same shape as counting valid time-zone codes from a raw integer stream.
- #63mediumsometimes asked
63. Binary Tree Zigzag Level Order Traversal
Return the zigzag (alternating left-to-right then right-to-left) traversal of a binary tree. Workday uses this to test BFS + per-level transformation — same pattern as alternating row directions when emitting a multi-level approval-chain report.
- #64mediumsometimes asked
64. Construct Binary Tree from Preorder and Inorder Traversal
Reconstruct a binary tree from its preorder and inorder traversals. Workday uses this to test tree-construction reasoning — same shape as rebuilding an org-chart from two parallel HRIS exports.
- #68mediumsometimes asked
68. Sort List
Sort a linked list in O(n log n) time and O(1) auxiliary space. Workday uses this for merge-sort-on-linked-lists fluency — same shape as merge-sorting an audit-log linked stream without buffering.
- #72mediumsometimes asked
72. Implement Trie (Prefix Tree)
Implement a trie with insert, search, and startsWith. Workday uses this for prefix-search infrastructure — same data structure powering autocomplete on employee names and department codes.
- #76mediumsometimes asked
76. Kth Smallest Element in a BST
Find the kth smallest value in a BST. Workday uses this to test in-order traversal awareness — same shape as 'the kth-earliest hire date in a salary-sorted directory'.
- #82mediumsometimes asked
82. Find the Duplicate Number
Find the duplicate number in an array of n+1 integers where each is in [1, n]. Workday uses this for Floyd's cycle detection in non-linked-list contexts — same shape as finding the duplicate employee record in a permission graph.
- #83mediumsometimes asked
83. Longest Increasing Subsequence
Find the length of the longest strictly-increasing subsequence. Workday uses this for DP-vs-patience-sort decisions — same shape as finding the longest streak of strictly-rising compensation reviews.
- #87mediumsometimes asked
87. Longest Substring with At Most K Distinct Characters
Find the length of the longest substring with at most k distinct characters. Workday uses this for sliding-window with constraint counters — same shape as 'longest payroll window covering at most k distinct cost centers'.
- #89mediumsometimes asked
89. Copy List with Random Pointer
Deep-copy a linked list where each node has a random pointer to any other node. Workday uses this for two-pass-or-hash-map design — same shape as cloning an employee record graph with cross-references intact.
- #91mediumrarely asked
91. Design Tic-Tac-Toe
Design an efficient Tic-Tac-Toe game. Workday uses this for incremental-state-tracking — same shape as maintaining running sums for the 'all approvals received?' check across multi-axis approval matrices.