I share my learnings here. Thanks for reading.
Nothing here yet.
Jan 17 · 3 min read · Problem You are given an array nums consisting of non-negative integers. You are also given a queries array, where queries[i] = [x<sub>i</sub>, m<sub>i</sub>]. (link) The answer to the i<sup>th</sup> query is the maximum bitwise XOR value of x<sub>i<...
Join discussionJan 15 · 2 min read · Problem Given an integer array nums, return the maximum result of nums[i] XOR nums[j], where 0 <= i <= j < n. (link) Example 1: Input: nums = [3,10,5,25,2,8] Output: 28 Explanation: The maximum result is 5 XOR 25 = 28. Example 2: Input: nums = [14,7...
Join discussionJan 15 · 2 min read · Problem Given a string s consisting of lowercase English characters, determine the total number of distinct non-empty substrings present in the string. A substring is defined as a contiguous block of characters within the string. Two substrings are c...
Join discussionJan 15 · 2 min read · Problem Given an array of strings words[], find the longest string such that every prefix of it is also present in words[]. If multiple strings have the same maximum length, return the lexicographically smallest one. (link) If no such string is found...
Join discussion