Tip 1: Always think through the solution on pen and paper before jumping directly into coding.
Tip 2: Take time to understand the problem thoroughly and break it down into smaller steps.
Tip 1: Keep your resume updated and accurate.
Tip 2: Include links to your projects in the resume.
We were invited with our laptops and were asked to open the given link and attend the round.



Certainly, let's go through the code step by step:
1. **Define the function:**
- `find_subsets` takes an input string (`input_str`) and returns a list of all its subsets.
2. **Initialize variables:**
- `subsets`: an empty list to store all subsets.
- `n`: the length of the input string.
3. **Loop through all possible combinations:**
- `for i in range(2**n)`: This loop runs from `0` to `2^n - 1`, covering all possible combinations of subsets.
4. **Generate subsets using bitwise operations:**
- `subset = [input_str[j] for j in range(n) if (i & (1 << j)) > 0]`:
- Here, we use bitwise operations to check if the j-th bit is set in the binary representation of `i`. If it is set, the corresponding character from the input string is included in the subset.
5. **Append subsets to the list:**
- `subsets.append(''.join(subset))`: This adds the generated subset to the list of subsets.
6. **Return the list of subsets:**
- `return subsets`: The function returns the list containing all subsets.
7. **Example usage:**
- `input_string = "ABC"`: This is the input string for which subsets are to be found.
- `result = find_subsets(input_string)`: The function is called with the input string, and the result is stored in the `result` variable.
8. **Print the result:**
- `print(result)`: This prints the list of subsets.
The final output for the example input "ABC" will be `['', 'A', 'B', 'AB', 'C', 'AC', 'BC', 'ABC']`. Each subset is generated using bitwise manipulation, considering whether each character should be included or not in the subset based on the binary representation of the loop variable `i`.
In covering a distance of 30 km, Abhay takes 2 hours more than Sameer. If Abhay doubles his speed, then he will take 1 hour less than Sameer. Abhay's speed is:
Ans: 5 kmph



Given an expression string exp, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are correct in the given expression.
The idea is to put all the opening brackets in the stack. Whenever you hit a closing bracket, search if the top of the stack is the opening bracket of the same nature. If this holds then pop the stack and continue the iteration. In the end if the stack is empty, it means all brackets are balanced or well-formed. Otherwise, they are not balanced.
Evening



Given a string s, find the length of the longest substring without repeating characters.
The approach stores the last indexes of already visited characters. The idea is to traverse the string from left to right, for each character at index j, and update the i pointer(starting index of a current window) to be the maximum of its current value and last Index of str[j] + 1. This step ensures that i is moved to the appropriate position to exclude any repeating characters within the new window.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which SQL clause is used to specify the conditions in a query?