Permutation of a sting (taking input from user )

5 Nov
import java.util.*;
class permutation {
    public static void main(String args[]){
       Scanner input=new Scanner(;
String st =input.nextLine();
    permutation ("",st);
public static void permutation(String prefix,String str){
    if(str.length() <= 1)
    System.out.println(prefix + str);
    for(int i=0;i < str.length();i++){

Recombination of a String

3 Nov
import java.util.*;
class MainClass{
public static void main(String args[]){
    Scanner input=new Scanner(;
String s =input.nextLine();
  if(s!= null && s.length()!=0)
 static void RecCombine(String prefix,String rest){
  if(rest.length() == 0)
   System.out.print(prefix + " ");
   RecCombine(prefix + rest.charAt(0),rest.substring(1));

Permutation of a string

3 Nov

class MainClass {
public static void main(String args[]) {
permuteString(“”, “Devlina”);

public static void permuteString(String beginningString, String endingString) {
if (endingString.length() <= 1)
System.out.println(beginningString + endingString);
for (int i = 0; i < endingString.length(); i++) {
try {
String newString = endingString.substring(0, i) + endingString.substring(i + 1);

permuteString(beginningString + endingString.charAt(i), newString);
} catch (StringIndexOutOfBoundsException exception) {

Reverse of a string

3 Nov

import java.util.*;
class ReverseWords{
public static void main(String args[]){
System.out.print(“Enter the string: “);
Scanner input=new Scanner(;
String str=input.nextLine();
StringBuffer buffer = new StringBuffer(str);
StringTokenizer st = new StringTokenizer(buffer.reverse().toString(), ” “);
System.out.print(“Reversed Words: “);
StringBuffer sb= new StringBuffer(st.nextToken());
System.out.print(” “+sb.reverse());

Fillers – get them down !!!

18 Mar

A Strategy for Removing Filler Words from Your Speech

I wish there were a switch that could be flipped to strike these from a speaker’s vocabulary. (I would flip the switch for myself!) Since the magic switch is elusive, here are the steps I recommend for minimizing these fillers.

Step 1 — Assess how often you are using filler words.

Before you embark on an effort to extinguish filler words, you should assess how frequently you utter filler words in your presentations. There are three easy ways to do this:

  1. Recruit an audience member to track it and provide feedback. Ask them not only to provide a count of each filler used, but also to comment on the impact.
  2. Record your voice, and do an objective analysis. I occasionally do this with a digital voice recorder. This can be done non-obtrusively for nearly any speech you deliver.
  3. Record yourself on video. This is marginally more obtrusive, but delivers more benefits. You get verbal feedback, but you also get to see the expressions on your face and what happens to your eyes when you are… uh… filling in words.

Your goal in assessment is to answer the following:

  • How often are you inserting filler words?
  • Are they distracting?
  • Are they undermining your credibility?

Step 2 — Understand why you are doing it, and why it is unnecessary.

Filler words — that is, filler sounds, filler words, and filler phrases — are inserted when our brain needs a moment to catch up to our mouth.

In certain contexts, filler words can serve a minor purpose. In a phone conversation, for example, a filler word sends a signal to the other person which says “I’m still thinking, and I’m not willing to pass the conversation back to you just yet.” In this way, the filler word fills the otherwise dead space which might indicate that you have completed your thought.

In the majority of public speaking situations, however, this is a completely useless signal. There isn’t any risk of someone in the audience taking over as soon as you go silent for a moment. You don’t need to fill that space to say that you’re thinking. You just need to … think, and your audience will understand.

Step 3 — Raise your level of preparation.

I have observed my filler word usage is highest when my preparation is lowest. Failure to prepare adequately has two effects:

  1. Your brain needs to “create” words on the fly, as opposed to pulling them from (preparation) memory. This increases cognitive strain, making it more likely that you’ll fall behind.
  2. You are (usually) more nervous when unprepared. Feeling nervous makes most people speak quicker, thus making it more likely that your brain won’t keep up.

One additional aspect of preparation which merits mentioning is the importance ofadequate rest. When you are rested, your brain will be sharper and you will find it easier to articulate your thoughts without stumbling.

Adequate preparation (which has many other benefits) will thus reduce the occurrence of filler words.

“As speakers force more and more content into their presentation, they’ll have to talk faster and faster to complete it on time. Avoid this temptation.”

Step 4A — Slow down.

Slowing your pace will also reduce those um’s and ah’s, because it makes it easier for your brain to keep up. It doesn’t have to be a drastic change; even a modest reduction in pace will help. As an added bonus, speaking a bit slower probably improves the ability of your audience to understand you.


To make this possible, you must be realistic about your time constraints and the amount of material you have. As speakers force more and more content into their presentation, they’ll have to talk faster and faster to complete it on time. Avoid this temptation.

Step 4B — Embrace the pause.

The best advice I ever received to reduce ums and ahs is to just pause. Replace the filler word(s) with silence. Since you’ve probably become accustomed to using filler words, replacing them with silence will take practice. Commit yourself to the change, and it will happen.

Step 5 — Monitor your progress, and be patient.

Every so often, step back and monitor your progress. Revisit the assessment tasks in Step 1, and compare the results.

  • Have you reduced the frequency of filler words in your speech?
  • Have you reduced the negative impact on your effectiveness caused by using filler words?
  • Do you notice a correlation between preparedness and speaking filler-free?
  • Is your pace slower?
  • Are you simply pausing when you think about what to say next?

Bookending Your Speech

18 Mar

Bookending Your Speech: A Definition

Picture a pair of bookends — that is, matched objects that are used to bound a series of books on a shelf. From a practical perspective, bookends support the books to ensure that they stay together. Aesthetically, however, they do much more. Bookends neatly (and often artistically) provide visual symmetry for the books on display. In doing so, they draw more attention to the row of books, and give the impression that these books are special and to be admired.

When you “bookend your speech”, you provide similar support for the body of your speech. By opening and concluding your speech with a common element, you neatly (and often artistically) provide cognitive symmetry for the speech which you have delivered. You draw more attention to your words, and give the impression that your message is special and to be accepted.

Bookending your speech is an elegant technique, and conveys the impression that your speech was crafted very carefully with a precise attention to detail. This boosts your credibility as your audience will be more likely to conclude that your entire speech was crafted with similar care, and therefore can be trusted.

Ways to Bookend Your Speech

There are a variety of strategies which you can adopt to bookend your speech. Choose the one which best fits your speech. Make sure that whichever strategy you use, your bookending element is closely related to your theme. Bookending your speech with random elements would be like bookending a set of classic literature novels with a pair of baseballs — functional, but not particularly meaningful.

  1. Tell two halves of a story.
    • Open your speech by introducing a story. You should not tell the whole story… just enough of the story to establish some conflict and introduce a character. Then, you proceed with the core of your speech.
    • At the end of your speech, pick up the story where you left off, and tell it to its conclusion.
    • Be sure that the story is intimately tied to your speech content. For example, if your speech is about following your dreams, you might tell a story where the main character follows her dreams. (The first half would explain that she is following her dream; the second half would tell how it turned out.)
  2. Ask a question, and answer it.
    • Open your speech by posing a question to the audience.
    • Conclude your speech by providing the answer.
    • For added effect, you can hint that the answer will come at the end.
    • A twist on the question-answer theme is to issue a challenge or a puzzle, and provide the solution.
  3. Use the same (or similar) quotations.
    • Open your speech with a quotation.
    • Close your speech with the same quotation.
    • This works best if your speech message has breathed new life into the quotation. Your goal is to have the audience reinterpret the quotation in light of your speech.
  4. Use contrasting quotations.
    • Open your speech with a quotation.
    • Close your speech with a quotation that opposes the original quotation.
    • Just as when using the same quotation as bookends, you want the audience to reinterpret the opening quote. Perhaps the opening quote is a commonly held belief, while the closing quote is a disruptive idea which your audience will now be more likely to accept.
  5. Use contrasting concepts.
    • Open your speech with a concept or theme.
    • Close your speech with a contrasting concept or theme.
    • For example, you might open with a story about birth, and close with a story about death.
    • Or, you might open with a story about being a student, and close with a related story about being a teacher.
    • Or, you might open with a story taken from your youth, and close with a related story about your own child.
  6. Use humor.
    • Open your speech with a humorous story or statement.
    • Close your speech with another humorous statement which either builds on the first, or references it in some way.
    • When using this bookending strategy (and the others too), be sure to use the same keywords both times so your audience “gets” the humorous reference. (e.g. if you open with a joke about a “red handbag”, don’t close with a joke about a “ruby purse”)
  7. Use a prop.
    • Open your speech with a prop.
    • Close your speech by using the prop a second time.
    • This strategy works best if you combine it with other strategies. For example, when introducing the prop, you might pose a question about it. Then, in your conclusion, you can answer that question.
  8. Use a slide.
    • Open your speech with a visual slide.
    • Close your speech with the same slide, or perhaps a slightly modified version of the first.
    • This works if the the picture you are displaying can be reinterpreted by your audience as a result of your speech message.
    • As a twist, your opening slide can be cropped to hide part of the image, while the concluding slide can reveal the full image. Again, this allows your audience to reinterpret the original image.
  9. Use any other common element.
    • Open your speech by referencing a fact, a word, a phrase, a movie title, etc.
    • Close your speech by referring back to the same fact, word, phrase, movie title, etc. in a meaningful way.

Bookending your speech is a master technique that is easy to apply, whether you are a professional speaker or a novice. Just today, I attended a Toastmasters meeting where a new member was delivering his first speech. He opened his speech humorously by “confessing” that he detested umbrellas. He then closed his speech by declaring his dream that umbrellas be banned by legislation. (The overall speech was humorous, and this particular humor fit well.)

Steve jobs speech at standford

18 Mar

Steve Jobs wrote and deliveredthe commencement speech “Stay Hungry. Stay Foolish.” to the graduates of Stanford University on June 12, 2005.

The style and content are verydifferent from his Apple product launch presentations, but no less worthy of study.

Noteworthy elements of this wonderful speech include:

  • strong opening;
  • simple classical structure;
  • the Rule of Three;
  • rich figures of speech; and
  • a recurring theme of birth/death/rebirth.