Tip 1 : Focus on understanding the concepts than completing the topic.
Tip 2 : Some topics takes hell lot of time and effort ,put all your efforts and hustle until you understand the thing
Tip 3 : Consistency.
Tip 1 : Quality over quantity
Tip 2 : 200% real and no boasting in that



1. The array follows 0-based indexing, so you need to return the 0-based index of the element.
2. Note that the element at the equilibrium index won’t be considered for either left sum or right sum.
3. If there are multiple indices which satisfy the given condition, then return the left-most index i.e if there are indices i,j,k…. which are equilibrium indices, return the minimum among them
4. If no such index is present in the array, return -1.



Let us assume that we have a list of words found in the dictionary in the same order as given: [“baa”, “abcd”, “abca”, “cab”, “cad”]
Now, ninja needs to find the order of the characters used in these strings.
The order would be: ‘b’, ‘d’, ‘a’, ‘c’, because “baa” comes before “abcd”, hence ‘b’ will come before ‘a’ in the order, similarly because, “abcd” comes before “abca”, ‘d’ will come before ‘a’. And so on.
A certain list of words might have more than one correct order of characters. In such cases, you need to find the smallest in normal lexicographical order. In the case of INVALID ORDER, simply return an empty string.
words = [“aba”, “bba”, “aaa”].
In this case, no valid order is possible because, from the first two words, we can deduce ‘a’ should appear before ‘b’, but from the last two words, we can deduce ‘b’ should appear before ‘a’ which is not possible.
words = [“ca”, “cb”].
In this case, we only know that ‘b’ will come after ‘a’ in the order of characters, but we don't have any knowledge of ‘c’. So, the valid correct orders can be = “abc”, “cab”, “acb”. Out of these, “abc” is lexicographically smallest, hence it will be printed.



Are you a team player?
What are your expectations from this job?

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
To make an AI less repetitive in a long paragraph, you should increase: