Menu

Puzzles

Four people need to cross a bridge in 17 minutes in the middle of the night. The bridge can only hold two or less people at any time and they only have one flashlight so they must travel together (or alone). The flashlight can only travel with a person so every time it crosses the bridge it must be carried back. Tom can cross in 1 minute, John can cross in 2 minutes, Sally can cross in 5 minutes, and Connor can cross in 10 minutes. If two people cross together they go as fast as the slower person.

How can they cross the bridge in 17 minutes or less?


Answer: First Tom and John will cross (2 minutes). Then Tom will bring the flashlight back (1 minute). Next Sally and Connor will cross (10 minutes). Then John will bring the flashlight back (2 minutes). Finally John and Tom will cross (2 minutes). 2 + 1 + 10 + 2 + 2 = 17 minutes.

Pyramid in Java Programming

Java Programs

In this tutorial we are going to write a program which will print Pyramid with given number.

import java.util.*;
public class Main {
public static void main(String[] args) {
for(int i=1;i<=5;i++){
System.out.println();
for(int j=1;j<=i;j++)
System.out.print("\t" + j);
}
}
}


Output:


 1
1 2
1 2 3
1 2 3 4
1 2 3 4 5

Fundamental Rights of Constitution of India

FUNDAMENTAL RIGHTS, CONSTITUTION OF INDIA


Fundamental rights are the basic human rights written in the Constitution of India which are guaranteed to all citizens of India.

General

12. Definition.
13. Laws inconsistent with or in derogation of the fundamental rights.

Right to Equality

14. Equality before law.
15. Prohibition of discrimination on grounds of religion, race, caste, sex or place of birth.
16. Equality of opportunity in matters of public employment.
17. Abolition of Untouchability.
18. Abolition of titles.

Right to Freedom

19. Protection of certain rights regarding freedom of speech, etc.
20. Protection in respect of conviction for offences.
21. Protection of life and personal liberty.
21A. Right to education.
22. Protection against arrest and detention in certain cases.

Right against Exploitation

23. Prohibition of traffic in human beings and forced labour.
24. Prohibition of employment of children in factories, etc.

Right to Freedom of Religion

25. Freedom of conscience and free profession, practice and propagation of religion.
26. Freedom to manage religious affairs.
27. Freedom as to payment of taxes for promotion of any particular religion.
28. Freedom as to attendance at religious instruction or religious worship in certain educational institutions.

Cultural and Educational Rights

29. Protection of interests of minorities.
30. Right of minorities to establish and administer educational institutions.
31. [Repealed.]

Saving of Certain Laws

Articles 31A and Article 31B are added by the first constitutional amendment in the year 1951. Article 31B says that any acts and regulations included in the Ninth Schedule of the constitution by the Parliament can override the fundamental rights and such laws cannot be repealed or made void by the judiciary on the grounds of violating fundamental rights.

31A. Saving of Laws providing for acquisition of estates, etc.
31B. Validation of certain Acts and Regulations.
31C. Saving of laws giving effect to certain directive principles.
31D. [Repealed.]

Right to Constitutional Remedies

32. Remedies for enforcement of rights conferred by this Part.
32A. [Repealed.]
33. Power of Parliament to modify the rights conferred by this Part in their application to Forces, etc.
34. Restriction on rights conferred by this Part while martial law is in force in any area.
35. Legislation to give effect to the provisions of this Part.