Print unique rows in a given boolean matrix | GeeksforGeeks

  Рет қаралды 13,235

GeeksforGeeks

GeeksforGeeks

7 жыл бұрын

Explanation for the article: www.geeksforgeeks.org/print-un...
This video is contributed by Harshit Jain.

Пікірлер: 11
@NavinPrasad06
@NavinPrasad06 4 жыл бұрын
Make each row into a String equivalent [1, 0 , 1, 0, 1, 0] ==> "101010". Save all these strings into a Set. Print Set elements.
@kdroadie
@kdroadie 3 жыл бұрын
Take an empty map, make all the rows as a string of 0 and 1 and print this sting if it is not present in map and insert it into map, otherwise skip this row.
@rahulkhandelwal8781
@rahulkhandelwal8781 7 жыл бұрын
Use hashing, convert each row to its decimal equivalent and check if it already exists in the hash table, if no print it. O(row*column) auxillary space O(row)
@GeeksforGeeksVideos
@GeeksforGeeksVideos 7 жыл бұрын
Thank you for your suggestion, Rahul. :) I've shared it with our team.
@subhadeepdey2503
@subhadeepdey2503 7 жыл бұрын
If the matrix size is 400 * 400 then what happen?
@subhadeepdey2503
@subhadeepdey2503 7 жыл бұрын
For 64 bit system it support maximum 64 *64 matrix. For large size of matrix does not work
@sridevi-gq3uj
@sridevi-gq3uj 5 жыл бұрын
could anyone provide the c code for simple approach in the above video?
@manveersingh5822
@manveersingh5822 7 жыл бұрын
Amazing !!
@GeeksforGeeksVideos
@GeeksforGeeksVideos 7 жыл бұрын
Thanks!
@KnowledgeAmplifier1
@KnowledgeAmplifier1 5 жыл бұрын
Simple java code Using Set: import java.util.*; class Uni { public static void main(String args[]) { Scanner obj=new Scanner(System.in); System.out.println("Enter the no.of rows:"); int m=obj.nextInt(); System.out.println("Enter the no.of columns:"); int n=obj.nextInt(); int a[][]=new int[m][n]; for(int i=0;i
Trick for spiral matrix traversal
10:12
Techdose
Рет қаралды 200 М.
Convert array into Zig-Zag fashion | GeeksforGeeks
8:53
GeeksforGeeks
Рет қаралды 43 М.
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 107 МЛН
لقد سرقت حلوى القطن بشكل خفي لأصنع مصاصة🤫😎
00:33
Cool Tool SHORTS Arabic
Рет қаралды 29 МЛН
Clown takes blame for missing candy 🍬🤣 #shorts
00:49
Yoeslan
Рет қаралды 49 МЛН
Опасность фирменной зарядки Apple
00:57
SuperCrastan
Рет қаралды 12 МЛН
SHA: Secure Hashing Algorithm - Computerphile
10:21
Computerphile
Рет қаралды 1,2 МЛН
Largest Sum Contiguous Subarray | GeeksforGeeks
14:06
GeeksforGeeks
Рет қаралды 219 М.
Rotten oranges problem | Leetcode #994
12:39
Techdose
Рет қаралды 63 М.
Find the Number Occurring Odd Number of Times | GeeksforGeeks
6:28
GeeksforGeeks
Рет қаралды 46 М.
9. Frequency of each character in a string (Intersting Logic)
13:08
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 107 МЛН