Write Java program to count Character Occurrences in given string

แชร์
ฝัง

ความคิดเห็น • 24

  • @Sandeepreddy0102
    @Sandeepreddy0102 ปีที่แล้ว +3

    good teacing all the best for birght future

    • @sowdhama
      @sowdhama  4 หลายเดือนก่อน

      Thank you very much for your encouraging words! I'm truly grateful for your support and well wishes.

  • @peddaboyenasuniljayachandr3010
    @peddaboyenasuniljayachandr3010 ปีที่แล้ว +3

    Good teaching

  • @neelimajaiswal3990
    @neelimajaiswal3990 2 หลายเดือนก่อน

    Maam in line no 29 , if we remove the space or double quotation..then why it is giving us output as integer values?

  • @AmazeU
    @AmazeU 4 หลายเดือนก่อน

    great explanation for hashmap

    • @sowdhama
      @sowdhama  4 หลายเดือนก่อน

      Thank you so much, I'm glad you found the explanation of HashMap helpful. If you have any further questions or need clarification on any aspect of HashMap or related topics, please feel free to ask. Your feedback is greatly appreciated!

  • @rachamallidorasrivignesh4499
    @rachamallidorasrivignesh4499 หลายเดือนก่อน

    The way of explanation is really so good madam could u make vedeos on java interview qusstikns to crack the interview please make it madam.

    • @sowdhama
      @sowdhama  หลายเดือนก่อน

      Thank you so much for your kind words! I'm glad you found the explanation helpful.
      I appreciate your suggestion about making videos on Java interview questions.
      Stay tuned for more content, and feel free to share any other topics you'd like me to cover.

  • @vijaykumar-ut1ze
    @vijaykumar-ut1ze ปีที่แล้ว +1

    hash map does not follow the insertion order right?

    • @sowdhama
      @sowdhama  ปีที่แล้ว

      Yes, you are right

    • @vijaykumar-ut1ze
      @vijaykumar-ut1ze ปีที่แล้ว

      @@sowdhama int that case how to print the insertion order

    • @sowdhama
      @sowdhama  ปีที่แล้ว

      @@vijaykumar-ut1ze you can use LinkedHashMap,
      It keeps the keys in the order they were inserted

    • @vijaykumar-ut1ze
      @vijaykumar-ut1ze ปีที่แล้ว +1

      @@sowdhama got it thanks
      Can you create frame work related interview wuestions

  • @rakhamajighagare
    @rakhamajighagare ปีที่แล้ว +2

    Input is String str="AAAABBBCCA" output : A=4 B=3 C=2 A=1 (Ask this program recent interview) pls provide solution

    • @cult_boy5255
      @cult_boy5255 9 หลายเดือนก่อน

      you can use Java8 feature for this.

    • @amrutaselmokar1126
      @amrutaselmokar1126 6 วันที่ผ่านมา

      i was also asked this question

  • @shivarajyadachi1842
    @shivarajyadachi1842 5 หลายเดือนก่อน

    public class Test {
    public static void main(String[] args) {
    String s ="ABBCCCDDDD";
    int n = s.length();
    // A1B2C3D4
    int count=1;
    Map map = new LinkedHashMap();

    for(int i=0 ; i1)
    {
    System.out.print(z+""+map.get(z));
    }
    }
    }
    }

  • @badrinarayana9028
    @badrinarayana9028 7 วันที่ผ่านมา

    Benki

  • @tmsdeepak2376
    @tmsdeepak2376 ปีที่แล้ว

    This solution will not work if we have repeating characters ex: aabbcccaadd -> a2b2c3a2d2. But great explnation

    • @prasadpatil6511
      @prasadpatil6511 ปีที่แล้ว

      Hi Deepak,
      could you please lt know what we need to do to make this work?

    • @SeverinSuverenere
      @SeverinSuverenere 10 หลายเดือนก่อน +1

      This is false, just try it yourself, works perfectly! :D

    • @TheJami2010
      @TheJami2010 8 หลายเดือนก่อน +1

      this solution perfectly works