Leetcode with dani – Telegram
Leetcode with dani
1.31K subscribers
196 photos
14 videos
56 files
240 links
Join us and let's tackle leet code questions together: improve your problem-solving skills
Preparing for coding interviews
learning new algorithms and data structures
connect with other coding enthusiasts
Download Telegram
Last year interview
Forwarded from Eunuch
Report on my Interview

Literally when I started my PC stacked🤯 and he was a peace guy he literally gave me 20 min after that I changed my PC with my friend and shared that.
1. After I shared my PC he introduced himself to me and also told me to share my screen asked me to go from tab desktop to check whether I shared my screen.
Also he asked me to show my ID in front of the screen.

2. He dropped the question it was
leetcode 1198 Premium question (https://github.com/doocs/leetcode/blob/main/solution/1100-1199/1198.Find%20Smallest%20Common%20Element%20in%20All%20Rows/README_EN.md)

3. I asked him to give me some time to understand the problem. When I saw the word strictly increasing I thought the question was Monotonic Stack but it wasn't.
4. After few silent minutes I think my adrelanine hormone just increased and the optimal one came to me but not the brute.
5. So I thought of a way to just sort the dictionary and make explain it as brute force. And literally it worked and asked me to Optimize it after I explained the time complexity. He also guided me on some other optimal related things like he told me to finish it inside the nested loop since it is strictly increasing matrix so I literally did that and explained as Optimal form and after I explained I implemented it quickly I started implementing while I was explaining the Brute one.
6. The technical was like that we finished it in 30min after that he gave 3 min and copy the code run and submit. He didn't told me whether it was accepted but I personally tested it on sharepad and it was correct for th given testcases.
7. After 5 min we started the Behavioural Interview he asked me 7 questions and agree on the policy the questions was literally same as the
G4 Interview Template

so I highly recommend to prepare on it.
8. After the interview I asked him about A2SV and other tech staff since he was Graduate student. And the interview entirely ended in 1:10 hr.
8
I will share interview template and more interview questions
👍7
Forwarded from Nardos
A2SV G7 Education Interview Preparation Toolkit - Remote.pdf
260.5 KB
Good Morning, A2SV community! 🌞
Here’s a complete guide to help you navigate the G7 remote education journey 🎓, understand the interview process 💬, and meet the required prerequisites .
👍54
G6 Interview Question
2
I HAVE INTERVIEWED ON A2SV ON THURSDAY AND THE QUESTION WAS



/*
Question Denoscription
Given a string s and an integer k, return the number of substrings in s of length k with no repeated characters.

Example 1:

Input: s = "havefunonleetcode", k = 5
Output: 6
Explanation: There are 6 substrings they are: 'havef','avefu','vefun','efuno','etcod','tcode'.

Example 2:

Input: s = "home", k = 5
Output: 0
Explanation: Notice k can be larger than the length of s. In this case, it is not possible to find any substring.


Constraints:
1 <= s.length <= 104
s consists of lowercase English letters.
1 <= k <= 104
*/


FINALLY I HAVE SOLVED THE QUESTION LIKE THIS IN C++ MAY BE IT IS USEFUL
#include <bits/stdc++.h>
using namespace std;
class Solution {
    public :
        int solve (string s,int k){
            vector <int> freq(26);
           
            int l=0;int r=0;
            int offset=(int)'a';
            int ans=0;
            while (r<s.size()){
                if (r-l<k-1){  
                   freq[s[r]-offset]++;
                    r++;            
                }else if (r-l==k-1){
                    freq[s[r]-offset]++;
                    r++;
                    bool t=true;
                    for (int x:freq){
                        if (x>1){
                          t=false;
                        }
                    }
                    t?ans+=1:ans=ans;
                   
                }else if (r-l>k-1){
                    freq[s[l]-offset]--;
                    l++;
                }
               
            }
            return ans;
        }
};

int main () {
    string s="abcdefhijklmnopqrstuvwxyz";
    int k=5;
    Solution* sol=new Solution();
    cout<<sol->solve(s,k);
}
🙏42❤‍🔥1
Todays another interview questions
"""

Question Denoscription
Given an input string s, reverse the order of the words.

A word is defined as a sequence of non-space characters. The words in s will be separated by at least one space.

Return a string of the words in reverse order concatenated by a single space.

Note that s may contain leading or trailing spaces or multiple spaces between two words.
The returned string should only have a single space separating the words. Do not include any extra spaces.



Example 1:

Input: s = "the sky is blue"
Output: "blue is sky the"
Example 2:

Input: s = " hello world "
Output: "world hello"
Explanation: Your reversed string should not contain leading or trailing spaces.
Example 3:

Input: s = "a good example"
Output: "example good a"
Explanation: You need to reduce multiple spaces between two words to a single space in the reversed string.


Constraints:

1 <= s.length <= 104
s contains English letters (upper-case and lower-case), digits, and spaces ' '.
There is at least one word in s.


"a good example"
["a","good","example"]
L R


[example,"good","a"]


"""

#will s will split
#variables left->0 rght ->len(splited)-1
#will have a while l<L left+=1 righ-=1


def revercing_word(s):
words=[]
for word in s.split(" "):
if word:
words.append(word)

left=0
right=len(words)-1


while left<right:
words[left],words[right]= words[right],words[left]
left+=1
right-=1

return " ".join(words)
print(revercing_word("hello world"))
5
If u love science and PHY check this utube channel it's makes science and phy easy and interesting https://youtube.com/@mahesh_shenoy?si=3kd_uV6fyvcMKi9T
Forwarded from Yonathan
You saw the demo. Now it’s time to try it.
Mekach’s waitlist is officially open.

🛡 https://mekach.yonathan.tech
Please open Telegram to view this post
VIEW IN TELEGRAM
📢 Deadline Extended!

Due to the overwhelming number of requests, we’ve officially extended the A2SV G7 Education Application deadline to November 21.

This is your moment to learn, grow, and master world-class software engineering skills through one of Africa’s most rigorous and impactful education programs.

Join a program that builds a solid foundation for your tech career and opens doors to global opportunities at companies like Google, Bloomberg, Amazon, and Databricks. Don’t miss it! 🌍

👉 Apply now: https://form.typeform.com/to/xIK0MwKn
👉Spread the word! Share to a friend and help us reach more aspiring engineers.
😭😭
Forwarded from 4-3-3 ስፖርት በኢትዮጵያ (𝐌𝐫.Ʀᴏʙᴀ)
የኮሪደር ሳር" በልተው የተያዙት አህዮች ጉዳይ!

እነዚህ ሁለት አህዮች ከአጥሩ ወጥተው፣ ብዙ ውዝግብ በሚያስነሳ ተግባር ላይ ተሰማርተው መገኘታቸው ተዘግቧል።

የክሱ ዝርዝር:
* ተከሳሾች: ሁለት አህያዎች ።
* የወንጀል ድርጊት:"የኮሪደር ሳር" (Corridor Grass) መብላት።

* የእስር ጊዜ: ከተያዙ በኋላ ለ30 ሰዓታት ያህል ታስረው እንደቆዩ ተሰምቷል።

የአካባቢው ነዋሪዎች እና ምስክሮች የአህዮቹ ታስሮ መቆየት ከመጠን በላይ እንደሆነ ቢገልጹም፣ አህዮቹ ግን በዝምታቸው እና በንፁህ ዓይናቸው የሚገባቸውን ፍርድ እየጠበቁ ነው።


ተጨማሪ ዝርዝር መረጃውን በዜና ቻናላችን ያግኙ - 433 World News

@Bisrat_Sport_433et @Bisrat_Sport_433et
🤣15🐳21
Forwarded from 「 Eyu core 」
በግ መስለዉ ወደ Spain ለመግባት ሲሞክሩ ድንበር ላይ የተያዙ ስደተኞች ናቸዉ
😁13🌚4