Skip to main content

Posts

Showing posts with the label Google

Wave Array | Convert an array to a wave array

 You have given a sorted array a[ ] of distinct integers and you have to sort the array in a wave-like pattern. It will be arranged like a[0]>=a[1]<=a[2]>=a[3]<=a[4]... This question has been asked in Google, Microsoft, Adobe, Amazon, Goldman Sachs, Paytm , and FactSet . Input: n=5 a[ ] = {1, 2, 3, 4, 5} Output: 2 1 4 3 5 So how can we solve this problem? If our array is already sorted then we have to just swap the array at the alternate elements. Like for a[ ] = {1, 2, 3, 4, 5} Loop1: i=0, a[ ] = {2, 1, 3, 4, 5} Loop2: i=2, a[ ] = {2, 1, 4, 3, 5} for Loop 3: i=4 which is not less than n-1 i.e. 4. So the loop ends here. The array generated is forming a wave pattern: {2, 1, 4, 3, 5}. Cpp code: #include   <bits/stdc++.h> using   namespace   std ; int   main () {      int  n;     cin  >>  n;      int  a[n];      for  ( int  i  ...

Government bring new strict guidelines for Social Media and OTT platforms

 The government of India on Thursday bring new laws for regulating the Social Media platforms like Facebook and Twitter and OTT platforms like Netflix and Amazon Prime. The government has said them to remove any content flagged by the authorities within 36 hours. They have to set up a complaint redressal mechanism with an officer being based in India. These guidelines also said social media platforms such as Twitter and Facebook to identify the originator of a message that the government consider being anti-national and against the security and sovereignty of India. This is the first time such rules are formed in the country within the jurisdiction for digital and social media platforms. These rules have come after a spat between Government and Twitter over certain messages related to Farmers protest. The government had said to remove about 1500 account and messages but Twitter didn't want to do so. But, Twitter followed it after the warning of penal action. IT minister has said ma...

Google Classroom and Google Meet got 50+ new features

 Yesterday Google announced more than 50 new features for its education-focused products, including Google classroom and Google meet. Google classroom will have an offline mode and improved mobile grading. Google has also rebranded its GSuite for education as Google Workspace for Education . It will have one-stop access to Google Classroom, Google Meet and Google Drive. Google has also said that more than 170 million students and teachers worldwide rely on its suite tools. Now, the android version of Google classroom will be the official mode to ease the learning process. Students will also be able to start their work offline, review their assignments, access the attachments in Google Drive and write assignments in Google Docs - everything without internet. Google has also improved the grading system on android app. It will let easily switch between students submission and grade work. Google is also adding the add-ons options to let teachers integrate their favourite 3rd party Edu-...