How it works
Logo@2xLogo mindzip color
Login

Deepak Surya

ft
01Follow
FollowingFollowers

Quotes
68

There are 8 primitive data types Turn back
9
Java
String class is also a data type. It is immutable.
10
Java
Scanner class is used to read input.
7
Java
An array is a reference data type, meaning that it's just an address
7
Java
Functions declared static don't need the creation of an instance for being accessed or used.
7
Java
Object is a superclass of everything we create in java
7
Java
A subclass can be generalized to a superclass. A superclass cannot become a more specific subclass.
5
Java
If a superclass does not have a default constructor(constructor without parameters), any subclasses extending it must make an explicit call to one of the parameterized constructors of the superclass.
5
Java
An abstract method is a method declared without an implementation. Abstract methods don't have a body. Abstract classes may have abstract and non-abstract methods.
5
Java
Classes being written in the same file should not have access modifiers or the code will not execute.
5
Java
Miss data arguments in printf while trying to print the value of something, We get a warning saying that there are more '%' conversions than data arguments
2
C programming
+
2
C programming
-
2
C programming
*
2
C programming
/
2
C programming
%
2
C programming
++
2
C programming
--
2
C programming
==
2
C programming
!=
2
C programming
>
2
C programming
<
2
C programming
>=
2
C programming
<=
2
C programming
&&
2
C programming
||
2
C programming
!
2
C programming
?:
2
C programming
&
2
C programming
|
2
C programming
^
2
C programming
~
2
C programming
<<
2
C programming
>>
2
C programming
=
2
C programming
+=
1
C programming
-=
1
C programming
*=
1
C programming
/=
1
C programming
%=
1
C programming
<<=
1
C programming
>>=
1
C programming
&=
1
C programming
^=
1
C programming
!=
1
C programming
sizeof()
1
C programming
[ ]
1
C programming
&
1
C programming
*
1
C programming
->
1
C programming
.
1
C programming
,
1
C programming
()
1
C programming
{}
1
C programming
:
1
C programming
//
1
C programming
/*
1
C programming
*/
1
C programming
Heap's algorithm generates all possible permutations of n objects.
11
Heap's Algorithm
It generates each permutation from the previous one by interchanging a single pair of elements; the other n-2 elements are not disturbed
9
Heap's Algorithm
First set a counter i to 0. Now we perform the following steps repeatedly until i is equal to n.
9
Heap's Algorithm
We use the algorithm to generate the (n-1)! permutations of the first n-1 elements, adjoining the last element to each of these.
8
Heap's Algorithm
Thus we generate all of the permutations that end with the last element.
5
Heap's Algorithm
Then if n is odd, we switch the first element and the last one.
3
Heap's Algorithm
If n is even, we switch the i-th element with the last one.
3
Heap's Algorithm
Note that there's no difference between n even and n odd in the first iteration.
3
Heap's Algorithm
Now we add one to the counter i and repeat.
3
Heap's Algorithm
In each iteration, the algorithm will produce all of the permutations that end with the element that has just been moved to the "last" position.
3
Heap's Algorithm

We use cookies to understand our websites traffic and offer our website visitors personalized experience. To find out more, click ‘More Information’. In addition, please, read our Privacy policy.