Code Snippets Interview Questions
Questions Answers Views Company eMail

Write a function, tokenize_string(input_string, delimiter_list) that returns a list of strings that are separated by the delimiters. For example: tokenize_string("How now, Mrs. Brown Cow") returns ['How', 'now', 'Mrs', 'Brown', 'Cow']

Traviate,

1 2715

Write a function to efficiently convert a floating point number to a rational number. For example, given 0.125 return "1/8"

1164

Write a function that takes an unsorted integer array, and returns a three element subset whose sum is zero.

1227

Write a function that takes an array of integers and returns that array rotated by N positions. For example, if N=2, given the input array [1, 2, 3, 4, 5, 6] the function should return [5, 6, 1, 2, 3, 4]

1841

Write a function that takes an array of integers and efficiently calculates and returns the Least Common Multiply in python.

1224

Write a function that takes as input a binary tree, and prints out each level of the tree on a newline. For example: a / b c / / d e f will output: a b c d e f

1317

Write a function that takes an integer and returns the smallest number that is greater than the given number which is a palendrome. For example, if the input was 111 the next palindromic number would be 121.

1390

Given a circular list of integers (when you reach the end of the list you come back to the beginning), what is the most efficient algorithm to find the smallest integer in the list? For example: circular_list = [22, 52, 66, 82, 5, 8, 12, 19].

1367

What is CDC?

2 2551

What is Telematics?

2 2365

What is the J2ME platform?

1 2145

J2ME defines two configurations - CLDC and CDC. Explain them

1 2324

What are profiles in J2ME?

1 2035

What is Java Community Process (JCP)?

1 2361

Why does Java strictly specify the range and behavior of its primitive types?

1 3165


Un-Answered Questions { Code Snippets }

how to pass data between pages using Cookies

1837


Write a program to model an exploding firecracker in the xy plane using a particle system

3674


code to create a new window

1744


Write a program that will convert an integer pointer to an integer and vice-versa.

507


how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

3108






import java.awt.*; import java.awt.event.*; public class Agency extends Frame implements ActionListener { Label l1,l2,l3,l4; Button b1; TextField t1,t2; String s1,s2,s3,s4; public static void main(String args[]) { new Agency().setVisible(true); } public Agency() { super("Gas Agency Package"); setSize(1280,800); setBackground(Color.lightGray); setLayout(null); // setLayout(new BorderLayout()); t1=new TextField(20); t1.setBounds(440,150,200,30); t1.setBackground(Color.white); t2=new TextField(20); t2.setBounds(440,180,200,30); t2.setBackground(Color.white); t2.setEchoChar('*'); l1=new Label("Gas Agency Package"); l1.setBounds(400,30,300,50); l1.setFont(new Font("TimesRoman",Font.BOLD,25)); l1.setAlignment(Label.CENTER); l2=new Label("Enter your ID and Passoword"); l2.setFont(new Font("TimesRoman",Font.BOLD,20)); l2.setBounds(270,80,300,50); l3=new Label("Enter ID"); l2.setFont(new Font ("TimesRoman",Font.BOLD,20)); l3.setBounds(270,150,120,50); l4=new Label("Enter Passoword"); l2.setFont(new Font ("TimesRoman",Font.BOLD,20)); l4.setBounds(270,180,140,50); add(l1); add(l2); add(l3); add(t1); add(l4); add(t2); b1=new Button("Login"); b1.setBackground(Color.white); b1.setBounds(400,280,100,70); b1.addActionListener(this); add(b1); } public void actionPerformed(ActionEvent e) { if(e.getSource()==b1) { s3="svce"; s4="svce"; s1=t1.getText(); s2=t2.getText(); if(s1.equals(s3) && s2.equals(s4)) { //System.out.println("password is correct"); MenuForm m= new MenuForm(); m.setVisible(true); //this.dispose(); } else { System.out.println("password not correct"); } this.dispose(); } } } plzzzzzzz xplain me this java code like why i m including this packages n the whole code plzzzzzz

1948


Write a Program to truncate a given floating point value (e.g.16.25=16).

515


What is XML Element?

391


plzzzzzzzzz xplain this code import java.awt.*; import java.awt.event.*; public class Link extends Frame implements ActionListener { Label l1; Button b1; public static void main(String sr[]) { new Link().setVisible(true); } public Link() { super("Warning"); setSize(500,500); setBackground(Color.lightGray); setLayout(null); l1=new Label("There is no Link"); l1.setBounds(0,0,500,460); l1.setFont(new Font("TimesRoman",Font.BOLD,35)); l1.setAlignment(Label.CENTER); add(l1); b1=new Button("QUIT"); b1.setBackground(Color.orange); b1.setBounds(0,460,500,40); b1.addActionListener(this); add(b1); } public void actionPerformed(ActionEvent e) { this.dispose(); } }

1576


Design an implement of the inputs functions for event mode

2946


Discuss an algorithm to traverse a tree, depth first.

1217


Can someone please explain more about how the XML Gateway works and what its purpose is?

1999


Write a routine to implement the polymarker function

4364


Code for Easily Using Hash Table?

2375


Write a (n) algorithm that sorts n distinct integers, ranging in size between 1 and kn inclusive, where k is a constant positive integer. (Hint: Use a kn-element array.)

4427