๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.63K subscribers
5.61K photos
3 videos
95 files
10.6K links
๐ŸšฉMain Group - @SuperExams
๐Ÿ“Job Updates - @FresherEarth

๐Ÿ”ฐAuthentic Coding Solutions(with Outputs)
โš ๏ธDaily Job Updates
โš ๏ธHackathon Updates & Solutions

Buy ads: https://telega.io/c/cs_algo
Download Telegram
๐Ÿš€ Exciting Apprenticeship Opportunity at Microsoft India!

๐ŸŽ‰Microsoft India is now accepting applications for its 12-Month Software Engineering Apprenticeship Program. This is a fantastic opportunity for recent graduates to launch their careers at Microsoft!

๐Ÿ“ข This apprenticeship offers a comprehensive training framework that includes both hands-on project work and structured classroom learning, providing the opportunity to build real-world software, collaborate with global teams, and grow under the guidance of experienced mentors. As a Software Engineering Apprentice, you will gain exposure to cutting-edge technologies, develop in-demand skills, and be part of a vibrant, inclusive communityโ€”all while making meaningful contributions and accelerating your career in tech.

๐ŸŒŸ Eligibility: Graduates of 2025 with no active academic backlogs and no prior full-time employment
๐Ÿ“ Locations: Hyderabad, Bangalore
๐Ÿ“… Duration: 12 months (Expected start: November 2025)
๐Ÿ’ป Apply Now: https://lnkd.in/gRTzJp4g
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
def getMaxConsecutiveHidden(commits):
    n = len(commits)
    if n <= 2:
        return 0

    max_hidden = 0
    start = 0


    if commits[-1] != commits[0] + n - 1:
        can_hide_all = True
        for i in range(1, n - 1):
            if commits[i] != commits[0] + i:
                can_hide_all = False
                break
        if can_hide_all:
            return n - 2

    for i in range(1, n):
        if commits[i] == commits[i - 1] + 1:
            continue
        else:
            seq_length = i - start
            if seq_length > 1:
                valid = True
                if start > 0 and i < n:
                    if (commits[start] == commits[start - 1] + 1 and
                        commits[i] == commits[i - 1] + 1):
                        valid = False
                if valid:
                    max_hidden = max(max_hidden, seq_length - 1)
            start = i


    seq_length = n - start
    if seq_length > 1:
        valid = True
        if start > 0:
            if commits[start] == commits[start - 1] + 1:
                valid = False
        if valid:
            max_hidden = max(max_hidden, seq_length - 1)

    return max_hidden