**G**iven two words word1 and word2, find the minimum number of operations required to convert word1 to word2.

You have the following 3 operations permitted on a word:

- Insert a character
- Delete a character
- Replace a character

You have the following 3 operations permitted on a word:

- Insert a character
- Delete a character
- Replace a character

You may return the answer in any order. The answer is guaranteed to be unique (except for the order that it is in.)

There are a total of numCourses courses you have to take, labeled from 0 to numCourses-1.

Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pair: [0,1]

Given the total number of courses and a list of prerequisite pairs, is it possible for you to finish all courses?

**Example 1**:

Input: numCourses = 2, prerequisites = [[1,0]]

Output: true

Explanation: There are a total of 2 courses to take.

To take course 1 you should have finished course 0. So it is possible.

**Example 2**:

Input: numCourses = 2, prerequisites = [[1,0],[0,1]]

Output: false

Explanation: There are a total of 2 courses to take.

To take course 1 you should have finished course 0, and to take course 0 you should

also have finished course 1. So it is impossible.

**Constraints**:

The input prerequisites is a graph represented by a list of edges, not adjacency matrices. Read more about how a graph is represented.

You may assume that there are no duplicate edges in the input prerequisites.

1 <= numCourses <= 10^5

**GIT URL:**__ Java Solution of Leet Code's Course Schedule problem__

__Java Solution 1__

-K Himaanshu Shuklaa.

Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pair: [0,1]

Given the total number of courses and a list of prerequisite pairs, is it possible for you to finish all courses?

Input: numCourses = 2, prerequisites = [[1,0]]

Output: true

Explanation: There are a total of 2 courses to take.

To take course 1 you should have finished course 0. So it is possible.

Input: numCourses = 2, prerequisites = [[1,0],[0,1]]

Output: false

Explanation: There are a total of 2 courses to take.

To take course 1 you should have finished course 0, and to take course 0 you should

also have finished course 1. So it is impossible.

The input prerequisites is a graph represented by a list of edges, not adjacency matrices. Read more about how a graph is represented.

You may assume that there are no duplicate edges in the input prerequisites.

1 <= numCourses <= 10^5

-K Himaanshu Shuklaa.

Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an array.

**Example 1**:

Input: 2

Output: [0,1,1]

**Example 2**:

Input: 5

Output: [0,1,1,2,1,2]

Input: 2

Output: [0,1,1]

Input: 5

Output: [0,1,1,2,1,2]

Each person may dislike some other people, and they should not go into the same group.

Formally, if dislikes[i] = [a, b], it means it is not allowed to put the people numbered a and b into the same group.

Return true if and only if it is possible to split everyone into two groups in this way.

Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1.

__Example 1__: Input: [0,1], Output: 2

Explanation: [0, 1] is the longest contiguous subarray with equal number of 0 and 1.

__Example 2__: Input: [0,1,0], Output: 2

Explanation: [0, 1] (or [1, 0]) is a longest contiguous subarray with equal number of 0 and 1.

__Note__: The length of the given binary array will not exceed 50,000.

Explanation: [0, 1] is the longest contiguous subarray with equal number of 0 and 1.

Explanation: [0, 1] (or [1, 0]) is a longest contiguous subarray with equal number of 0 and 1.

Now, we may draw connecting lines: a straight line connecting two numbers A[i] and B[j] such that:

A[i] == B[j];

The line we draw does not intersect any other connecting (non-horizontal) line.

Note that a connecting lines cannot intersect even at the endpoints: each number can only belong to one connecting line.

Return the maximum number of connecting lines we can draw in this way.

(Recall that a binary search tree is a binary tree where for every node, any descendant of node.left has a value < node.val, and any descendant of node.right has a value > node.val. Also recall that a preorder traversal displays the value of the node first, then traverses node.left, then traverses node.right.)

Return the intersection of these two interval lists.

(Formally, a closed interval [a, b] (with a <= b) denotes the set of real numbers x with a <= x <= b. The intersection of two closed intervals is a set of real numbers that is either empty, or can be represented as a closed interval. For example, the intersection of [1, 3] and [2, 4] is [2, 3].)

As per the latest buzz,

Input: "tree"

Output: "eert"

Explanation:

'e' appears twice while 'r' and 't' both appear once.

So 'e' must appear before both 'r' and 't'. Therefore "eetr" is also a valid answer.

Given a m * n matrix of ones and zeros, return how many square submatrices have all ones.

**Example 1**:

Input: matrix =

[

[0,1,1,1],

[1,1,1,1],

[0,1,1,1]

]

Output: 15

Explanation:

There are 10 squares of side 1.

There are 4 squares of side 2.

There is 1 square of side 3.

Total number of squares = 10 + 4 + 1 = 15.

Input: matrix =

[

[0,1,1,1],

[1,1,1,1],

[0,1,1,1]

]

Output: 15

Explanation:

There are 10 squares of side 1.

There are 4 squares of side 2.

There is 1 square of side 3.

Total number of squares = 10 + 4 + 1 = 15.

Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.

**Note**:

You may assume k is always valid, 1 ≤ k ≤ BST's total elements.

**Example 1**:

Input: root = [3,1,4,null,2], k = 1

3

/ \

1 4

\

2

Output: 1

**Example 2**:

Input: root = [5,3,6,2,4,null,null,1], k = 3

5

/ \

3 6

/ \

2 4

/

1

Output: 3

You may assume k is always valid, 1 ≤ k ≤ BST's total elements.

Input: root = [3,1,4,null,2], k = 1

3

/ \

1 4

\

2

Output: 1

Input: root = [5,3,6,2,4,null,null,1], k = 3

5

/ \

3 6

/ \

2 4

/

1

Output: 3

The span of the stock's price today is defined as the maximum number of consecutive days (starting from today and going backwards) for which the price of the stock was less than or equal to today's price.

For example, if the price of a stock over the next 7 days were [100, 80, 60, 70, 60, 75, 85], then the stock spans would be [1, 1, 1, 2, 1, 4, 6].

Input: s1 = "ab" s2 = "eidbaooo"

Output: True

Explanation: s2 contains one permutation of s1 ("ba").

Input:s1= "ab" s2 = "eidboaoo"

Output: False

Given a string s and a non-empty string p, find all the start indices of p's anagrams in s.

Strings consists of lowercase English letters only and the length of both strings s and p will not be larger than 20,100.

The order of output does not matter.

Strings consists of lowercase English letters only and the length of both strings s and p will not be larger than 20,100.

The order of output does not matter.

You should try to do it in place. The program should run in O(1) space complexity and O(nodes) time complexity.

Given a circular array C of integers represented by A, find the maximum possible sum of a non-empty subarray of C.

Here, a circular array means the end of the array connects to the beginning of the array. (Formally, C[i] = A[i] when 0 < = i < A.length, and C[i+A.length] = C[i] when i > = 0.)

Also, a subarray may only include each element of the fixed buffer A at most once. (Formally, for a subarray C[i], C[i+1], ..., C[j], there does not exist i < = k1, k2 < = j with k1 % A.length = k2 % A.length.)

**Example 1**:

Input: [1,-2,3,-2]

Output: 3

Explanation: Subarray [3] has maximum sum 3

Here, a circular array means the end of the array connects to the beginning of the array. (Formally, C[i] = A[i] when 0 < = i < A.length, and C[i+A.length] = C[i] when i > = 0.)

Also, a subarray may only include each element of the fixed buffer A at most once. (Formally, for a subarray C[i], C[i+1], ..., C[j], there does not exist i < = k1, k2 < = j with k1 % A.length = k2 % A.length.)

Input: [1,-2,3,-2]

Output: 3

Explanation: Subarray [3] has maximum sum 3

The film is a biopic on late mathematical wizard Shakuntala Devi, who was nicknamed the human computer for her innate ability to make complex calculations within seconds.

Implement a trie with insert, search, and startsWith methods.

**Example**:

Trie trie = new Trie();

trie.insert("apple");

trie.search("apple"); // returns true

trie.search("app"); // returns false

trie.startsWith("app"); // returns true

trie.insert("app");

trie.search("app"); // returns true

**Note**:

You may assume that all inputs are consist of lowercase letters a-z.

All inputs are guaranteed to be non-empty strings.

Trie trie = new Trie();

trie.insert("apple");

trie.search("apple"); // returns true

trie.search("app"); // returns false

trie.startsWith("app"); // returns true

trie.insert("app");

trie.search("app"); // returns true

You may assume that all inputs are consist of lowercase letters a-z.

All inputs are guaranteed to be non-empty strings.

लॉकडाउन के तकरीबन २ हफ्ते पहले वर्सोवा के गुरुद्वारा साहिब सचखंड दरबार जाना हुआ था, वहाँ गुरु नानक देव जी से जुड़ी की खूबसूरत बात सुनने को मिली। नानक के पिता का नाम कल्यानचंद दास बेदी था, जो पेशे से पटवारी हुआ करते थे।

Given a non-negative integer number represented as a string, remove k digits from the number so that the new number is the smallest possible.

You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once. Find this single element that appears only once.

**Example 1**:

Input: [1,1,2,3,3,4,4,8,8]

Output: 2

**Example 2**:

Input: [3,3,7,7,10,11,11]

Output: 10

Input: [1,1,2,3,3,4,4,8,8]

Output: 2

Input: [3,3,7,7,10,11,11]

Output: 10

Given a coordinate (sr, sc) representing the starting pixel (row and column) of the flood fill, and a pixel value newColor, "flood fill" the image.

To perform a "flood fill", consider the starting pixel, plus any pixels connected 4-directionally to the starting pixel of the same color as the starting pixel, plus any pixels connected 4-directionally to those pixels (also with the same color as the starting pixel), and so on. Replace the color of all of the aforementioned pixels with the newColor.

Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order.

**Example 1**:

Input: [-4,-1,0,3,10]

Output: [0,1,9,16,100]

Input: [-4,-1,0,3,10]

Output: [0,1,9,16,100]

The actor-turned-author Twinkle Khanna shared a monologue on her Instagram page on the occasion of Mother’s Day.

In the hilarious video, which is full of MrsFunnyBones's signature sarcasm reevealed what all the mothers really want from their children instead of all the fancy greetings.

The 46-year-old author, said, what she really wants for Mother's day is a day off from responsibilities, to not be asked where is the blue t-shirt, if her kids can go to visit their friends and when the coronavirus lockdown is going to end.

The monologue, shared by Twinkle also features how she wants her kids to call her 'aunty' on mother's day and not 'mummy'.

In the hilarious video, which is full of MrsFunnyBones's signature sarcasm reevealed what all the mothers really want from their children instead of all the fancy greetings.

The 46-year-old author, said, what she really wants for Mother's day is a day off from responsibilities, to not be asked where is the blue t-shirt, if her kids can go to visit their friends and when the coronavirus lockdown is going to end.

The monologue, shared by Twinkle also features how she wants her kids to call her 'aunty' on mother's day and not 'mummy'.

If the town judge exists, then:

The town judge trusts nobody.

Everybody (except for the town judge) trusts the town judge.

There is exactly one person that satisfies properties 1 and 2.

You are given trust, an array of pairs trust[i] = [a, b] representing that the person labelled a trusts the person labelled b.

Input: 16

Output: true

Input: 14

Output: false

You are given an array coordinates, coordinates[i] = [x, y], where [x, y] represents the coordinate of a point. Check if these points make a straight line in the XY plane.

**Constraints**:

- 2 < = coordinates.length <= 1000
- coordinates[i].length == 2
- -10 ^ 4 < = coordinates[i][0], coordinates[i][1] < = 10^4
- coordinates contains no duplicate point.

Two nodes of a binary tree are cousins if they have the same depth, but have different parents.

We are given the root of a binary tree with unique values, and the values x and y of two different nodes in the tree.

Given an array nums of integers, return how many of them contain an even number of digits.

**Example 1**:

Input: nums = [12,345,2,6,7896]

Output: 2

Explanation:

Input: nums = [12,345,2,6,7896]

Output: 2

Explanation:

- 12 contains 2 digits (even number of digits).
- 345 contains 3 digits (odd number of digits).
- 2 contains 1 digit (odd number of digits).
- 6 contains 1 digit (odd number of digits).
- 7896 contains 4 digits (even number of digits).
- Therefore only 12 and 7896 contain an even number of digits.

आज वैशाख मास के शुक्ल पक्ष की चतुर्दशी है। कहते है आज ही के दिन भगवान् विष्णु ने नरसिंह अवतार लिया था, इसीलिए आज का दिन नरसिंह जयंती के रूप में बनाया जाता है।

मुझे बचपन से ये अवतार थोड़ा भयानक लगा क्यूंकि हर जगह नरसिंह जी का सिर्फ रौद्र रूप देखा। करीब करीब एक दशक पहले जब मैं जुहू के इस्कॉन टेम्पल गया तब वहाँ एक छोटे बच्चे को रोते हुए देखा, वो नरसिंह के भयावह रूप वाली मूर्ति देखकर डर गया था।

*"डरते नहीं बेटा ये भगवान् है,"* बच्चे की माँ उससे ये कहकर चुप करा रही ही ।

**"नरसिंह रूप देखके डर तो स्वाभाविक है,"** मेरे मुँह से सहसा निकल पड़ा ।

साथ ही खड़े एक उम्र दराज़ शख्स ने मुस्कुराते हुए कहा,**"स्वाभाविक नहीं है। नरसिंह अवतार देखकर तो बिलकुल भी नहीं ।"**

मुझे बचपन से ये अवतार थोड़ा भयानक लगा क्यूंकि हर जगह नरसिंह जी का सिर्फ रौद्र रूप देखा। करीब करीब एक दशक पहले जब मैं जुहू के इस्कॉन टेम्पल गया तब वहाँ एक छोटे बच्चे को रोते हुए देखा, वो नरसिंह के भयावह रूप वाली मूर्ति देखकर डर गया था।

साथ ही खड़े एक उम्र दराज़ शख्स ने मुस्कुराते हुए कहा,

Input: [3,2,3]

Output: 3

Input: [2,2,1,1,1,2,2]

Output: 2

We will be creating an authorization server and embedding the resource server inside authorization server. Authorization server will generate the tokens and resource server will validate these token.

We will be having two services, first one would be authorization server (along with resource server) and the second one would be a client, from which we will be accessing the servers.

शबरी कहती है

रामानंद की रामायण के मखमली क़ालीन जैसी लगती है। शबरी का बार बार खुद को 'नीच' कहने वाले संवाद इस मखमली क़ालीन पर टाट के पैबंद जैसे लगते है।

s = "leetcode"

return 0.

s = "loveleetcode",

return 2.

Given a binary array, find the maximum number of consecutive 1s in this array.

**Example 1**:

Input: [1,1,0,1,1,1]

Output: 3

**Explanation**: The first two digits or the last three digits are consecutive 1s. The maximum number of consecutive 1s is 3.

**Note**:

The input array will only contain 0 and 1.

The length of input array is a positive integer and will not exceed 10,000

Input: [1,1,0,1,1,1]

Output: 3

The input array will only contain 0 and 1.

The length of input array is a positive integer and will not exceed 10,000

Input: 5

Output: 2

Explanation: The binary representation of 5 is 101 (no leading zero bits), and its complement is 010. So you need to output 2.

- An access token is a string representing an authorization issued to the client. Tokens represent specific scopes and duration of access, granted by the resource owner, and enforced by the resource server and authorization server.
- An access token is put in the Authorization header of our request and it usually looks like 'Bearer h090Yuuyuiyv'. It is verified by the API, which the client is calling.
- Access token are usually in JWT format, but you can use any other format.
- Access tokens are usually short lived, because it is difficult (although not impossible) to centrally revoke access tokens.
- The responsibility of access token is to access data before it gets expired.

It enables a third-party application to obtain limited access to an HTTP service:

a). Either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service

b). Or by allowing the third-party application to obtain access on its own behalf.

Each letter in the magazine string can only be used once in your ransom note.

You're given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of stone you have. You want to know how many of the stones you have are also jewels.

The letters in J are guaranteed distinct, and all characters in J and S are letters. Letters are case sensitive, so "a" is considered a different type of stone from "A".

The letters in J are guaranteed distinct, and all characters in J and S are letters. Letters are case sensitive, so "a" is considered a different type of stone from "A".

आज कही पढ़ा

थोड़ा हास्यास्पद लगा, जन्मदिन सीता का और पूजा राम के साथ? बताये ज़रा क्या ऐसी कोई धार्मिक मान्यता है जो कहती हो राम नवमी के दिन राम-सीता की पूजा या फिर जन्माष्टमी के दिन कृष्णा के साथ राधा की आराधना करना चाहिए? खैर जाने दीजिये, पुरुष प्रधान समाज में ऐसा मुमकिन कहा?

कभी समय मिले तो वाल्मीकि रामायण पढ़ियेगा, पुरुष प्रधानता की अनेक मिसाल मिल जायेगी।

शायद इसीलिए वाल्मीकि जी ने सर्ग ६६(छियासठ) में सिर्फ दो श्लोको (१३-१४) में सीता की उत्पत्ति के बारे में संक्षेप में वर्णन किया है, हलाकि राम जन्म विस्तार में बताया गया है।

Suppose you have n versions [1, 2, ..., n] and you want to find out the first bad one, which causes all the following ones to be bad.

You are given an API bool isBadVersion(version) which will return whether version is bad. Implement a function to find the first bad version. You should minimize the number of calls to the API.

Over the years, the Hindi film industry has been consistently blessed with some exceptionally talented artists and one such mention-worthy name is Anushka Sharma. She made her quintessential debut with Shah Rukh Khan in Rab Ne Bana Di Jodi and has not looked back ever since. From conning a con artist in Ladies vs. Ricky Bahl, to bringing to life a soldier’s story in Jab Tak Hain Jaan and working her magic in Sui Dhaga, Pari, Sulta and Ae Dil Hai Mushkil, the actress has secured a special place in the viewers’ hearts with her commendable, versatile performance. She recently announced her digital debut as producer of upcoming Amazon Original Series Paatal Lok that is set to release on 15th May.