CodingHuman #Coding_Help , All exam codes, Coding solutions, accenture TCS Wipro Nagarro Persistent Cisco
588 subscribers
136 photos
310 links
We Provide free material, Coding stuff, Placement material, Handwritten Notes, previous year company questions, Job updates and many more.
Conding help.
Download Telegram
def split_string_cost(S):
    # Length of the string S
    len_S = len(S)
   
    # To store the cost of the split parts
    max_cost = 0
    @Coding_human
    # Set to keep track of distinct characters in the first part
    distinct_chars_A = set()
   
    # List to keep track of the cost for the second part from each split position
    cost_B = [0] * len_S
   
    # Set to keep track of distinct characters in the second part
    distinct_chars_B = set()
   
    # Calculate cost for second part from the end
    for i in range(len_S - 1, -1, -1):
        distinct_chars_B.add(S[i])
        cost_B[i] = len(distinct_chars_B)
   
    # Calculate maximum sum of cost for parts A and B
    for i in range(len_S - 1):
        distinct_chars_A.add(S[i])
        cost_A = len(distinct_chars_A)
        cost = cost_A + cost_B[i + 1]
        max_cost = max(max_cost, cost)
   
    # Calculate the result as |S| - X
    result = len_S - max_cost
    return result

# Example usage
S = "aaabbb"
print(split_string_cost(S))  # Output: 3
Please read guys 🙏🙏

Don't give money to anyone.
We are providing free help.

Stay away from rippers.
Stay alert stay safe.


Kisi ko bhi koi paisa/rs dene ki koi zaroorat nahi h,
Hum free material provide karte hai.
Aap Rippers se door the.🙏

If you are ripped by someone, we are not responsible at all.

Thank you
@Coding_human
✍️TECH MAHINDRA Interview Exp

1) Self Intro.
2) Project.
3) Qns on Project.
4) Which Programming Language
     you r Familiar with It.
5) What is Primarykey, Foreignkey.
6) Views in SQL.
7) Syntax of View.
8) Rank.
9) External Table.
10) Method Overloading.
11) Method Overriding.
@Coding_human
12) Inheritance.
13) Explain Types of Inheritance
14) Why Multiple Inheritance is not
       Supported.
15) Is Multiple Inheritance.
      Supported injava and wha is it.
16) Relocation.
17) Night Shifts.
18) Why you Choose TechM.
19) About TechM.

@Coding_human