![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Nizamuddin Siddiqui has Published 2307 Articles
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
160 Views
The easy approach is that we could create four nested loops and check one by one that the sum of all the four elements is zero or not. If the sum of the four elements is zero then print elements.Time Complexity − O(n4)Space Complexity − O(1)We could use an unordered ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
148 Views
Two Pointers pattern and is similar to Triplet Sum to Zero. We can follow a similar approach to iterate through the array, taking one number at a time. At every step, we will save the difference between the triplet and the target number, and at each step we will compare ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
178 Views
Create 2 different arrays leftDis and rightDis. The leftDis will store the value when moved from left direction. The rightDis will store the shortest value when moved from right. Whenever the character is met add the position of the character to the array. In the last step calculate the maximum ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
295 Views
Create 2 different arrays leftDis and rightDis. The leftDis will store the value when moved from left direction. The rightDis will store the shortest value when moved from right. Whenever the character is met add the position of the character to the array. In the last step calculate the minimum ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
215 Views
The easy approach is that we could create three nested loops and check one by one that the sum of all the three elements is zero or not. If the sum of the three elements is zero then print elements.Time Complexity − O(n3)Space Complexity − O(1)We could use an unordered ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
129 Views
The primitive solution for this problem is to scan all elements stored in the input matrix to search for the given key. This linear search approach costs O(MN) time if the size of the matrix is MxN.The matrix needs to be scanned from the top right, if the search element ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
158 Views
The primitive solution for this problem is to scan all elements stored in the input matrix to search for the given key. This linear search approach costs O(MN) time if the size of the matrix is MxN.The matrix can be viewed as a sorted one-dimensional array. If all rows in ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
483 Views
A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same elements.Example 1[[1, 2, 3, 4], [5, 1, 2, 3], [9, 5, 1, 2]]Output −trueIn the above grid, the diagonals are −"[9]", "[5, 5]", "[1, 1, 1]", "[2, 2, 2]", "[3, 3]", "[4]".In each diagonal all elements ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
171 Views
To create scatterplot using ggplot2 without grey background in R, we can follow the below steps −First of all, create a data frame.Then, create the scatterplot using geom_point function of ggplot2 package.After that, add theme_minimal() function to the ggplot function.Create the data frameLet's create a data frame as shown below ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
816 Views
To display NA frequency for a ggplot2 graph using color brewer in R, we can follow the below steps −First of all, create a data frame.Then, create the chart with default colors.After that, use scale_colour_brewer function to create the bar chart and set the color of NA values bar with ... Read More