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 41 problems of 100
- #1easyfrequently asked
1. Two Sum
Given an array of integers and a target, return the indices of the two numbers that add up to the target. Workday uses this to evaluate whether you reach for a hash map instead of brute-force enumeration when reconciling payroll line items.
- #2easyfrequently asked
2. Valid Parentheses
Given a string containing only brackets, determine if the input is valid. Workday uses this to gauge stack intuition for nested approval chains — every 'submit' must match a 'review'.
- #3easyfrequently asked
3. Merge Two Sorted Lists
Merge two sorted linked lists into one sorted list. Workday uses this to evaluate pointer hygiene — payroll merges sorted contribution streams (401k, HSA, FSA) into a single time-ordered ledger every cycle.
- #4easyfrequently asked
4. Remove Duplicates from Sorted Array
Remove duplicates in-place from a sorted array. Workday tests this for two-pointer fluency — they dedup employee IDs in payroll batches that arrive from multiple HRIS feeds.
- #6easyfrequently asked
6. Search Insert Position
Given a sorted array and a target, return the index where the target is found or would be inserted. Workday uses this to test binary-search hygiene for slot-aware pay-grade insertion into compensation bands.
- #7mediumfrequently asked
7. Maximum Subarray
Find the contiguous subarray with the largest sum. Workday uses this to test Kadane's pattern for finding the best fiscal-quarter window of an employee's incremental bonuses.
- #9easyfrequently asked
9. Merge Sorted Array
Merge two sorted arrays in-place into the first one (sized for both). Workday uses this for end-to-front pointer practice — merging current-period and adjustment ledger entries when only the result buffer exists.
- #10easyfrequently asked
10. Binary Tree Inorder Traversal
Given the root of a binary tree, return the inorder traversal of its node values. Workday uses this to verify you can both recurse AND iterate trees — org charts may be too deep for recursion when traversing a 50,000-employee hierarchy.
- #11easyfrequently asked
11. Same Tree
Given two binary trees, determine if they are structurally identical with equal values. Workday uses this to test parallel recursion — diffing two snapshots of an org chart to find structural drift.
- #13easyfrequently asked
13. Maximum Depth of Binary Tree
Given the root of a binary tree, return its maximum depth. Workday uses this as the tree-recursion warmup before harder org-chart depth questions like 'find the deepest reporting chain'.
- #15easyfrequently asked
15. Path Sum
Given a binary tree and a target sum, determine if there's a root-to-leaf path summing to the target. Workday uses this to evaluate accumulator-passing in recursion — analogous to summing payroll items along an approval chain.
- #17easyfrequently asked
17. Best Time to Buy and Sell Stock
Given daily stock prices, find the maximum profit from a single buy-and-sell. Workday uses this to test running-minimum tracking — the same pattern used for finding the best fiscal-year window in compensation grading.
- #20easyfrequently asked
20. Linked List Cycle
Determine if a linked list has a cycle. Workday uses this for Floyd's tortoise-and-hare fluency — same pattern that catches circular reporting in org-chart imports.
- #21mediumfrequently asked
21. Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. Workday uses this as a stand-in for 'efficient running aggregates' — the same pattern used for tracking the lowest pay-grade in a permission-stack snapshot.
- #22mediumfrequently asked
22. Two Sum II - Input Array Is Sorted
Find two numbers in a 1-indexed sorted array that sum to a target. Workday uses this to test two-pointer pattern recognition on sorted ledger data — common shape for paid-vs-owed reconciliations.
- #27mediumfrequently asked
27. House Robber
Maximize the sum of values you can take from a row of houses without taking two adjacent. Workday uses this as a DP warmup — same shape as scheduling non-overlapping shift-bonuses across consecutive pay periods.
- #30easyfrequently asked
30. Reverse Linked List
Reverse a singly linked list. Workday uses this for pointer hygiene — the same prev/curr/next dance needed when reversing an audit-log timeline.
- #31mediumfrequently asked
31. Add Two Numbers
Given two numbers as reversed linked lists, add them and return as a linked list. Workday uses this to test carry-propagation discipline — same as adding two arbitrary-precision payroll totals stored as digit lists.
- #32mediumfrequently asked
32. Longest Substring Without Repeating Characters
Find the length of the longest substring without repeating characters. Workday uses this for sliding-window fluency — same shape as 'longest unique-employee streak in an audit log'.
- #35mediumfrequently asked
35. 3Sum
Find all unique triplets in an array that sum to zero. Workday uses this as a sort + two-pointer composition test — same shape as 'find three pay-grade adjustments that net to zero'.
- #41mediumfrequently asked
41. Search in Rotated Sorted Array
Search a target in a sorted-then-rotated array in O(log n). Workday uses this to test modified binary search — same shape as querying a payroll-cycle log that has been wrapped around midnight.
- #47mediumfrequently asked
47. Group Anagrams
Group strings into anagram clusters. Workday uses this for canonical-key bucketing — same shape as grouping department-code aliases that all refer to the same cost center.
- #49mediumfrequently asked
49. Jump Game
Given an array of max-jump lengths, determine if you can reach the last index. Workday uses this as a greedy-reasoning test — same shape as 'can a workflow proceed from any starting step given variable hop allowances'.
- #50mediumfrequently asked
50. Merge Intervals
Given a collection of intervals, merge all overlapping intervals. Workday uses this canonically for time-and-attendance — same shape as merging overlapping clock-in/out windows to compute total worked hours.
- #59mediumfrequently asked
59. Word Search
Determine if a word exists in a grid of letters using adjacent cells. Workday uses this for DFS-with-backtracking + visited-marking — same shape as searching for a specific approval-chain path through a workflow graph.
- #61mediumfrequently asked
61. Validate Binary Search Tree
Determine if a binary tree is a valid BST. Workday uses this to test recursion with bounds — same pattern as validating an org-chart's pay-grade ordering: every manager outranks all reports.
- #62mediumfrequently asked
62. Binary Tree Level Order Traversal
Return the level-order (BFS) traversal of a binary tree's values, grouped by level. Workday uses this for tier-by-tier org-chart processing — same shape as emitting all VPs first, then all directors, then all managers.
- #66mediumfrequently asked
66. Word Break
Determine if a string can be segmented into a sequence of dictionary words. Workday uses this for DP-on-strings — same shape as validating that a free-form job-title string can be decomposed into known role tokens.
- #67mediumfrequently asked
67. LRU Cache
Design an LRU cache with O(1) get and put. Workday uses this for hash-map + doubly-linked-list composition — same shape as caching the most-recently-viewed employee records in an HR app.
- #70mediumfrequently asked
70. Number of Islands
Count the number of islands in a 2D grid of '1' (land) and '0' (water). Workday uses this for grid-DFS counting — same shape as counting connected groups of co-located employees on a floor plan.
- #71mediumfrequently asked
71. Course Schedule
Determine if you can finish all courses given prerequisite dependencies. Workday uses this for cycle-detection in workflow DAGs — same shape as validating that an approval-chain definition doesn't loop back on itself.
- #73mediumfrequently asked
73. Kth Largest Element in an Array
Find the kth largest element without sorting the entire array. Workday uses this to test heap fluency — same shape as finding the top-k highest-paid employees per department for compensation reports.
- #74easyfrequently asked
74. Contains Duplicate
Determine whether an array contains any duplicates. Workday uses this for hash-set fluency — same shape as checking whether an employee ID appears twice in a payroll batch.
- #77mediumfrequently asked
77. Lowest Common Ancestor of a Binary Search Tree
Find the lowest common ancestor of two nodes in a BST. Workday uses this for org-chart-style 'common manager' queries — direct domain fit.
- #78mediumfrequently asked
78. Lowest Common Ancestor of a Binary Tree
Find LCA in a general binary tree (no BST property). Workday uses this for org-chart trees that aren't sorted — finding the lowest shared manager between two employees.
- #79mediumfrequently asked
79. Product of Array Except Self
Return an array where output[i] is the product of all elements except nums[i], without division and in O(n). Workday uses this for prefix/suffix product fluency — same shape as computing aggregate-without-self metrics across departments.
- #81easyfrequently asked
81. Move Zeroes
Move all zeros to the end of an array while preserving the order of non-zero elements. Workday uses this for two-pointer in-place fluency — same shape as deferring 'inactive' employee records to the end of an active-roster array.
- #84mediumfrequently asked
84. Coin Change
Find the minimum number of coins to make a target amount. Workday uses this for unbounded-knapsack DP — same shape as allocating the minimum number of pay-frequency cycles to reach a target year-to-date amount.
- #85mediumfrequently asked
85. Top K Frequent Elements
Return the k most frequent elements in an array. Workday uses this for bucket-sort vs heap decisions — same shape as 'top-k most-used permission codes across an org'.
- #92easyfrequently asked
92. Binary Search
Implement binary search on a sorted array. Workday uses this as a fluency check — they'll follow up with rotated-search and first-bad-version variants in the same interview.
- #96hardfrequently asked
96. Merge k Sorted Lists
Merge k sorted linked lists into one sorted list. Workday uses this for heap composition — same shape as merging time-sorted payroll streams from k departments into one chronological ledger.