TCS Digital - Advanced Coding | Pangram Strings | Daily Dose Ep-27 | Tamil | code io

  Рет қаралды 3,744

code io - Tamil

code io - Tamil

Күн бұрын

Pangram Strings - Geeks for Geeks
practice.geeks...
TCS Playlist:
• TCS Coding Interview Q...
--------------------------------------------------------------------------------------------------------------------
TCS Digital Advanced Coding - TCS Codevita - TCS Interview Question
Join our Telegram Forum for more Discussions
t.me/codeIOforum
Follow us in Instagram for more updates
/ code.i.o
#gfg #DailyDose #codeio

Пікірлер: 17
@usersumma
@usersumma Жыл бұрын
for bothsolutions we can add a condition to whether the given string has 26 characters and if not we can return false. if(s.length() < 26) return false; a small optimisation.
@gokulnath589
@gokulnath589 2 жыл бұрын
Bro yeepdi 97 subtraction panna index kedaikuthu please sollunga
@inaminam9080
@inaminam9080 Жыл бұрын
The ASCII value of A is 97 if we subract with any other character, we can get its actual number count, here it is used to store count in array so he used 97, we can also use 96 generally eg: a=97, if we subract b-97, we get 1,ie. 98-97=1
@enginecoder498
@enginecoder498 3 жыл бұрын
O(26)
@codeio
@codeio 3 жыл бұрын
Thats right!!!! 👏👏👏👍
@codeio
@codeio 3 жыл бұрын
But we conventionally use O(1) to denote constant space, as we ignore the coefficients when using Big O notation 😊😊
@anandhar9329
@anandhar9329 3 жыл бұрын
O(1)
@codeio
@codeio 3 жыл бұрын
Awesome na. 👏👏👏👏👏👏👍
@nthgtosay..6860
@nthgtosay..6860 Жыл бұрын
import java.util.Scanner; import java.util.Arrays; public class pangram { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.nextLine(); String nstr = str.replaceAll("\\s", "").toLowerCase(); char[] arr1 = nstr.toCharArray(); Arrays.sort(arr1); char[] arr = new char[26]; for (int i = 0; i < 26; i++) { arr[i] = (char) ('a' + i); } boolean isOk = Arrays.equals(arr, arr1); if (isOk) { System.out.println(" Pangram"); } else { System.out.println("Not a pangram"); } } } intha code la yen bro correct ans vara matrathu ?
@inaminam9080
@inaminam9080 Жыл бұрын
bro in arr, u will store the duplicate characters, that means, if ur sttung has "cocon", two time c is stored This is what i think
@vishwayajith1758
@vishwayajith1758 3 жыл бұрын
O(26) thana? A to Z vara thana store agum
@codeio
@codeio 3 жыл бұрын
Exactly evlo memory store aagum nu paatha 26 units of memory. Aana complexity nu namma yosikkura apa proportional ah yosippom, so 2N nu irrunthalum O(N) nu than solluvom we'll drop the coefficient always. Inga input string oda size ennvaa irrunthalum namma use panra array oda size is always 26 , constant. So constant space na namma O(1) nu than solluvom, as we drop than coefficient in calculating complexity.
@ramji-nw3oh
@ramji-nw3oh 3 жыл бұрын
0(1)
@codeio
@codeio 3 жыл бұрын
That's right bro 👏👏👏👏👍
@nithishkumark1644
@nithishkumark1644 3 жыл бұрын
Constant space thana...?
@codeio
@codeio 3 жыл бұрын
Yes na... Thats right
@SarathKumar-mf3xy
@SarathKumar-mf3xy 6 ай бұрын
O(1)
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
Pangram Program in Java | Pangram Problem Solution | Interview Questions on Pangram | ABC
16:53
ABC - Technology Training & Upskilling
Рет қаралды 56 М.
Python Full course for Beginners | Master Python in 10 Hours | code io - Tamil
10:48:12
Java Program to check given String is Panagram or not?
8:24
Learn With KrishnaSandeep
Рет қаралды 60 М.
OOPs in 3 Hrs | Object Oriented Programming in Java | Tamil | code io
3:38:02
What is React ? | Virtual DOM | React Ep-1 | code io - Tamil
16:02
code io - Tamil
Рет қаралды 3,2 М.
Facebook Uber Question | LeetCode 242. Valid Anagram | Tamil | code io
11:41
Solve String Programs in Java
14:37
Simply Coding
Рет қаралды 104 М.