
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10744 Articles

AmitDiwan
1K+ Views
When it is required to extract unique values from a dictionary, a dictionary is created, and the ‘sorted’ method and dictionary comprehension is used.Below is a demonstration for the same −Example Live Demomy_dict = {'hi' : [5, 3, 8, 0], 'there' : [22, 51, 63, 77], 'how' : [7, ... Read More

AmitDiwan
2K+ Views
When it is required to count the number of lower case characters in a string, the ‘islower’ method and a simple ‘for’ loop can be used.Below is the demonstration of the same −Example Live Demomy_string = "Hi there how are you" print("The string is ") print(my_string) my_counter=0 for i in ... Read More
Take in Two Strings and Display the Larger String without Using Built-in Functions in Python Program

AmitDiwan
805 Views
When it is required to take two strings and display the larger string without using any built-in function, the counter can be used to get the length of the strings, and ‘if’ condition can be used to compare their lengths.Below is the demonstration of the same −Example Live Demostring_1= "Hi there" ... Read More

AmitDiwan
2K+ Views
When it is required to find all the connected components using depth first search in an undirected graph, a class is defined that contains methods to initialize values, perform depth first search traversal, find the connected components, add nodes to the graph and so on. The instance of the class ... Read More

AmitDiwan
161 Views
ProblemWe are required to write a JavaScript function that takes in a number n. Our function should return an array showing all the ways of balancing n parenthesis.For example, for n = 3, the output will be −["()()()", "(())()", "()(())", "(()())", "((()))"]ExampleFollowing is the code − Live Democonst res = []; ... Read More

AmitDiwan
3K+ Views
When it is required to calculate the length of a string without using library methods, a counter is used to increment every time an element of the string is encountered.Below is the demonstration of the same −Example Live Demomy_string = "Hi Will" print("The string is :") print(my_string) my_counter=0 for i in ... Read More

AmitDiwan
840 Views
When it is required to remove a specific index character from a string which isn’t empty, it can be iterated over, and when the index doesn’t match, that character can be stored in another string.Below is the demonstration of the same −Example Live Demomy_string = "Hi there how are you" ... Read More

AmitDiwan
303 Views
When it is required to find the maximum sub array using Kadane’s algorithm, a method is defined that helps find the maximum of the sub array. Iterators are used to keep track of the maximum sub array.Below is the demonstration of the same −Example Live Demodef find_max_sub_array(my_list, beg, end): max_end_at_i ... Read More

AmitDiwan
545 Views
ProblemWe are required to write a JavaScript function that takes in an array of literals that might contain some 0s. Our function should tweak the array such that all the zeroes are pushed to the end and all non-zero elements hold their relative positions.ExampleFollowing is the code − Live Democonst arr ... Read More

AmitDiwan
422 Views
ProblemWe are required to write a JavaScript function that takes in an array of integers arr. Our function should return the string ‘odd’ if the sum of all the elements of the array is odd or ‘even’ if it’s even.ExampleFollowing is the code − Live Democonst arr = [5, 1, 8, ... Read More