473,320 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Shift Forward

nurulshidanoni
Given 80 35 5 12 60 25
When 80, do not do nothing, but when 35 , i want to shift it forward like
35 80 5 12 60 25
The I want to do an iteration again,unitl get 5 12 35 60 80.
Oct 2 '07 #1
3 1320
Meetee
931 Expert Mod 512MB
Given 80 35 5 12 60 25
When 80, do not do nothing, but when 35 , i want to shift it forward like
35 80 5 12 60 25
The I want to do an iteration again,unitl get 5 12 35 60 80.
Hi,
You can use any sorting method like bubble sort. It is in Article session. Also search on google for this.

Regards
Oct 2 '07 #2
sicarie
4,677 Expert Mod 4TB
Given 80 35 5 12 60 25
When 80, do not do nothing, but when 35 , i want to shift it forward like
35 80 5 12 60 25
The I want to do an iteration again,unitl get 5 12 35 60 80.
I'm sorry, but your algorithm does not make sense to me. When 80 do nothing? So you will never sort it, as it starts with 80. Please be more clear as to what you are trying to do.
Oct 2 '07 #3
Dear Sicarie

It was not a sort, but shift forward. That why, whne meet 80 do not do nothing , but when see 35 it smaller than 80, i want to shift forward.80 35......



I'm sorry, but your algorithm does not make sense to me. When 80 do nothing? So you will never sort it, as it starts with 80. Please be more clear as to what you are trying to do.
Oct 3 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Alex Stevens | last post by:
Hi All, I'm writing a launcher program which checks for updates and copies them down to the client. However, I would like the user to be able to modify the settings for the launcher. As this...
43
by: Mehta Shailendrakumar | last post by:
Hello, Can anyone suggest me operator to perform arithmetic shift in C? May it be for a perticular compiler. Thank you in advance. Regards, Shailendra
5
by: DbNetLink | last post by:
I am trying to convert some Japanese text encoded as Shift-JIS/ISO-2022-JP to UTF-8 so I can store all data in my database with a common encoding. My problem is the encoding conversion code works...
2
by: Matt Sawyer | last post by:
Hi, I'm attempting to do a drag and drop operation from one listbox to another. I have my listboxes setup with SelectionMode = MultiExtended so that I can use the shift key, cntrl key, etc. to...
7
by: Csaba Gabor | last post by:
I'd like to detect the shift key when a button is "clicked" in Firefox/Mozilla. If the button is clicked with the mouse, no problem. However, if the onclick event is keyboard originated, then my...
9
by: deepak | last post by:
If i'm shifting an integer 'n' times where n > sizeof(int), It's giving the same value as that of n-sizeof(n). Why is it behaving like this. I studied that the bit 'll be replaced by '0'. ...
4
by: sandhya | last post by:
Hello Folks, i hava a problem in coding of circular left shift of 25 bits in my program...how do i perform it, and how do i use unsigned in VB. My program (IDEA algorithm implementation in VB) ...
3
by: Amy Smith | last post by:
Hello there, I am having a small problem which been challenging me for few days and need help or advice. I am trying to calculate the day-shift for employees based on the time they started and...
3
by: Pietro | last post by:
Hi all, First of all I'd like to thank you very very much ,as finally after many years of searching,I could find a code to disable/enable the shift key,but actually i cannot use the code as I'm...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.