Latest update: For now I will be focussing more on DSA (Leetcode and other platforms)

But for the other section, I would be adding the articles of other creators which are good to start.

MyProfile: Linkedin , LeetCode , HackerRank ,

I'm just a problem solver looking to learn and contribute to the coding and developer community. I have recently moved from the SDET profile to the SDE role. Soon I will be starting a series that will cover all the basic/Advanced topics for an SDE. This would help the ones who are attending interviews.

Please correct me by commenting on posts if I am wrong about the concepts or require any improvement.

I will be using JAVA as a Language, but the intuition and discussion will be language-agnostic.

--

--

Easy

Given a string s, find the first non-repeating character in it and return its index. If it does not exist, return -1.

Example 1:

Input: s = "leetcode"
Output: 0

Example 2:

Input: s = "loveleetcode"
Output: 2

Example 3:

Input: s = "aabb"
Output: -1

Constraints:

  • 1 <= s.length <= 105
  • s consists of only lowercase English letters.

--

--

Hard

You are given a string s and an array of strings words of the same length. Return all starting indices of substring(s) in s that is a concatenation of each word in words exactly once, in any order, and without any intervening characters.

You can return the answer in any order.

Example 1:

Input: s = "barfoothefoobarman", words = ["foo","bar"]
Output: [0,9]
Explanation: Substrings starting at index 0 and 9 are "barfoo" and "foobar" respectively.
The output order does not matter, returning [9,0] is fine too.

Example 2:

Input: s = "wordgoodgoodgoodbestword", words = ["word","good","best","word"]
Output: []

Example 3:

Input: s = "barfoofoobarthefoobarman", words = ["bar","foo","the"]
Output: [6,9,12]

Constraints:

  • 1 <= s.length <= 104
  • 1 <= words.length <= 5000
  • 1 <= words[i].length <= 30
  • s and words[i] consist of lowercase English letters.

--

--