Featured Article

Count Distinct Subsequences

Given a string, find count of distinct subsequences of it. Examples: Input : str = “gfg” Output : 7 The seven distinct subsequences are “”, “g”, “f”, “gf”, “fg”, “gg” and “gfg” Input : str = “ggg” Output : 4 The six distinct subsequences are “”, “g”, “gg” and “ggg” The problem of counting distinct… Read More »

Cerner Interview Experience | Set 1 (For Software Engineer)

Round 1 (50 minutes) : Versant Test 8 sections to test basic English communication skills (Sample test can be taken from here: https://www.versanttest.com/samples/english.jsp). Each section contains around 16-20 questions ranging from English speaking in the microphone, attention to detail, hearing skill, typing speed and grammar test, English writing skill, grammar and punctuation test, basic fill… Read More »

Null Pointer Exception In Java

NullPointerException is a RuntimeException. In Java, a special null value can be assigned to an object reference. NullPointerException is thrown when program attempts to use an object reference that has the null value. These can be: Invoking a method from a null object. Accessing or modifying a null object’s field. Taking the length of null,… Read More »

Multiples of 3 or 7

Given a positive integer n, find count of all multiples of 3 or 7 less than or equal to n. Examples: Input : n = 10 Output : Count = 4 The multiples are 3, 6, 7 and 9 Input : n = 25 Output : Count = 10 The multiples are 3, 6, 7,… Read More »

Deque in Python

Deque can be implemented in python using the module “collections“. Deque is preferred over list in the cases where we need quicker append and pop operations from both the ends of container, as deque provides an O(1) time complexity for append and pop operations as compared to list which provides O(n) time complexity. Operations on… Read More »

instanceof operator vs isInstance() method in Java

instanceof operator and isInstance() method both are used for checking the class of the object. But main difference comes when we want to check the class of object dynamically. In this case isInstance() method will work. There is no way we can do this by instanceof operator. instanceof operator and isInstance() method both return a… Read More »

Implementing Artificial Neural Network training process in Python

An Artificial Neural Network (ANN) is an information processing paradigm that is inspired the brain. ANNs, like people, learn by example. An ANN is configured for a specific application, such as pattern recognition or data classification, through a learning process. Learning largely involves adjustments to the synaptic connections that exist between the neurons.   The… Read More »