TOC

TOC Institution for Programming in C, C++, Data structure algorithms, Unix Programming, Core Java, Design Patterns. http://www.tocind.com

07/01/2018

Starting new batch for
Data Structures & Algorithms- Concepts and Practices.
Implementation language- JAVA
Start date- 13-JAN-2018.
Course Fee- 4500/-
Please call at +91 - 9986 808 111 for more information.

19/10/2017

Happy diwali to everyone.

-Warm Regards
Abhishek Rajan.

Joshua Bloch- Guide to design an API
08/09/2017

Joshua Bloch- Guide to design an API

Google Tech Talks January 24, 2007 ABSTRACT Every day around the world, software developers spend much of their time working with a variety of Application Pr...

23/03/2017

Given an array, millions of records in there. Need sort the elements in an efficient way. What should be the approach ?

UML Documentation :
23/03/2017

UML Documentation :

UML Class Diagrams Reference - class, classifier, association, aggregation, composition.

01/01/2017

I wish a very happy and prosperous new year to all of you.

11/09/2015

Problem statement :
You have been given an array which contains integer elements and randomly zeros are present in that array. Push all zeroes at the end of the array.
Input : 0 5 0 8 3 4 0 2 0 0
Output : 2 5 4 8 3 0 0 0 0 0
Input : 1 0 0 0 3 2 0 5 0 6
Output : 1 6 5 2 3 0 0 0 0 0
Time complexity : O(n).

24/04/2015

Program to find out the 1st occurrence of a character in a given string in O(n) by Pratap Gaurav :
1 import java . util . * ;
2
3 public class TOCAlpha {
4
5 public static void main ( String [ ] args ) {
6
7 Scanner scan = new Scanner ( System . in ) ;
8
9 System . out . println ( "Enter String : \n" ) ;
10
11 String str = scan . nextLine ( ) ;
12
13 StringOperations . checkRpt ( str ) ;
14
15 }
16
17 }
18
19 class StringOperations {
20
21 private static char stringContent [ ] ;
22
23 public static void checkRpt ( String string ) {
24
25 int i = 0 ;
26 char temp = '\0' ;
27
28 stringContent = new char [ 26 ] ;
29
30 string = string . toUpperCase ( ) ;
31
32 while ( i < string . length ( ) ) {
33
34 temp = string . charAt ( i ) ;
35
36 if ( temp >= 'A' && temp

31/01/2015

An excellent book for Algorithm Puzzles : Anany Levitin
This book encompasses lot of amazing algorithm puzzles. This book is kind of one of the brain teasers in programming.

22/12/2014

What about this :
5 package org.toc.p;
6
7 class Program { // Implementation class
8 static {
9 if (true) {
10 static void foo () {
11 // body
12 }
13 }
14 }
15
16 static public void main (String... args) {
17
18 foo ();
19 }
20 }

03/09/2014

One more !!
1 class Myclass {
2 int i = 10;
3 static {
4 new Toc ();
5 }
6 }
7
8 class Toc {
9 static {
10 System.out.print(new Myclass ().i);
11 }
12 public static void main (String... args) {
13
14 }
15
16 }

03/09/2014

Guess the result of the following code list
1 class Myclass {
2 int i = 10;
3 }
4
5 class Toc {
6
7 static {
8 System.out.print (new Myclass ().i);
9 }
10
11 public static void main (String... args) {
12
13 }
14
15 }

Address

Bangalore
560054

Alerts

Be the first to know and let us send you an email when TOC posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Share