729. My Calendar I
You are implementing a program to use as your calendar. We can add a new event if adding the event […]
You are implementing a program to use as your calendar. We can add a new event if adding the event […]
You are given an array words of size n consisting of non-empty strings. We define the score of a string word as the number of strings words[i] such that word is a prefix of words[i]. For example, if words =
Given a singly linked list of integers. The task is to check if the given linked list is palindrome or
You are given two arrays with positive integers arr1 and arr2. A prefix of a positive integer is an integer formed by one or more of its
Given two strings s and p. Find the smallest window in the string s consisting of all the characters(including duplicates) of the string p. Return “-1”
You are given a 0-indexed string s and a dictionary of words dictionary. You have to break s into one or more non-overlapping substrings such that each substring is
Given an unsorted array arr of of positive integers. One number ‘A‘ from set {1, 2,….,n} is missing and one number ‘B‘
Given two integers n and k, return the kth lexicographically smallest integer in the range [1, n]. Example 1: Input: n = 13, k = 2 Output:
Given a string of characters, find the length of the longest proper prefix which is also a proper suffix. NOTE: Prefix
Given an integer n, return all the numbers in the range [1, n] sorted in lexicographical order. You must write an algorithm that
You are given a special linked list where each node has a next pointer pointing to its next node. You